@@ -266,9 +266,9 @@ const (
266266)
267267
268268func Test_extractModelNameAndFlags (t * testing.T ) {
269- t .Parallel ()
269+ // t.Parallel()
270270
271- testFS := fstest.MapFS {
271+ root := Root { "/home/me/models" , fstest.MapFS {
272272 "0.sh" : & fstest.MapFile {Data : []byte ("" )},
273273 "1.sh" : & fstest.MapFile {Data : []byte (script1 )},
274274 "2.sh" : & fstest.MapFile {Data : []byte (script2 )},
@@ -277,21 +277,21 @@ func Test_extractModelNameAndFlags(t *testing.T) {
277277 "5.sh" : & fstest.MapFile {Data : []byte ("llama-server --model ~/model.gguf" )},
278278 "6.sh" : & fstest.MapFile {Data : []byte ("/llama-server --model ~/model.gguf" )},
279279 "7.sh" : & fstest.MapFile {Data : []byte ("/llama-server\t -m\t ~/model.gguf\t -c\t 0" )},
280- }
280+ }}
281281
282282 tests := []struct { path , wantModel , wantFlags string }{
283- {"1.sh" , "/path/model.gguf" , `--no-mmap --chat-template-kwargs '{"reasoning_effort": "high"}' --reasoning-format auto -c 10240 # --no-context-shift` },
284- {"2.sh" , "/path/model.gguf" , `--no-mmap --chat-template-kwargs '{"reasoning_effort": "high"}' --reasoning-format auto -c 10240` },
285- {"3.sh" , "/path/model.gguf" , `--no-mmap --chat-template-kwargs '{"reasoning_effort": "high"}' --reasoning-format auto -c 10240` },
286- {"4.sh" , "" , "" },
287- {"5.sh" , "" , "" },
288- {"6.sh" , "~/model.gguf" , "" },
289- {"7.sh" , "~/model.gguf" , "-c\t 0" },
283+ {"/home/me/models/ 1.sh" , "/path/model.gguf" , `--no-mmap --chat-template-kwargs '{"reasoning_effort": "high"}' --reasoning-format auto -c 10240 # --no-context-shift` },
284+ {"/home/me/models/ 2.sh" , "/path/model.gguf" , `--no-mmap --chat-template-kwargs '{"reasoning_effort": "high"}' --reasoning-format auto -c 10240` },
285+ {"/home/me/models/ 3.sh" , "/path/model.gguf" , `--no-mmap --chat-template-kwargs '{"reasoning_effort": "high"}' --reasoning-format auto -c 10240` },
286+ {"/home/me/models/ 4.sh" , "" , "" },
287+ {"/home/me/models/ 5.sh" , "" , "" },
288+ {"/home/me/models/ 6.sh" , "~/model.gguf" , "" },
289+ {"/home/me/models/ 7.sh" , "~/model.gguf" , "-c\t 0" },
290290 }
291291 for _ , tt := range tests {
292292 t .Run (tt .path , func (t * testing.T ) {
293- t .Parallel ()
294- gotModel , gotFlags := extractModelNameAndFlags (testFS , tt .path )
293+ // t.Parallel()
294+ gotModel , gotFlags := extractModelNameAndFlags (root , tt .path )
295295 if string (gotModel ) != tt .wantModel {
296296 t .Errorf ("extractModelNameAndFlags(%s) = %s, want %s" , tt .path , gotModel , tt .wantModel )
297297 }
0 commit comments