Lines Matching refs:file

8 default_cmd="sparse \$file"
70 # get_tag_value(file) - get the 'check-<...>' tags & values
259 error "Can't open file $1"
278 echo " [file ...] Runs the test suite on the given file(s)."
280 echo " If no file is given, run the whole testsuite."
281 echo " single file Run the test in 'file'."
282 echo " format file [name [cmd]] Help writing a new test case using cmd."
296 # do_test(file) - tries to validate a test case
298 # it "parses" file, looking for check-* tags and tries to validate
308 file="$1"
311 get_tag_value $file
316 warning "$file: test unhandled"
332 disable "$test_name" "$file"
338 disable "$test_name" "$file"
344 disable "$test_name" "$file"
354 disable "$test_name" "$file"
366 disable "$test_name" "$file"
372 echo " TEST $test_name ($file)"
391 1> $file.output.got 2> $file.error.got
403 sed -n "/check-$stream-start/,/check-$stream-end/p" $file \
404 | grep -v check-$stream > "$file".$stream.expected
406 diff -u "$file".$stream.expected "$file".$stream.got > "$file".$stream.diff
409 error "see $file.$stream.* for further investigation."
410 [ $quiet -ne 1 ] && cat "$file".$stream.diff
423 has_each_patterns "$file" 'check-output-contains' absent $file.output.got
429 has_none_patterns "$file" 'check-output-excludes' present $file.output.got
436 minmax_patterns "$file" 'check-output-pattern' $file.output.got
443 match_patterns "$file" 'check-output-match' $file.output.got
450 return_patterns "$file" 'check-output-returns' $file.output.got
459 echo "info: XFAIL: test '$file' is known to fail"
461 echo "error: XPASS: test '$file' is known to fail but succeed!"
465 echo "error: FAIL: test '$file' failed"
468 echo "info: PASS: test '$file' passed"
482 rm -f $file.{error,output}.{expected,got,diff}
512 echo "Usage: $prog_name [option(s)] [--]format file [name [cmd]]"
515 echo " -a append the created test to the input file"
523 echo " file file containing the test case(s)"
524 echo " name name for the test case (defaults to file)"
525 echo " cmd command to be used (defaults to 'sparse \$file')"
529 # do_format([options,] file[, name[, cmd]]) - helps a test writer to format test-suite tags
545 def_cmd='test-linearize -Wno-decl $file'
548 def_cmd='test-linearize -Wno-decl $file'
551 def_cmd='sparse -E $file' ;;
553 def_cmd='scheck $file' ;;
572 file="$1"
579 $cmd 1> $file.output.got 2> $file.error.got
581 [ $append != 0 ] && exec >> $file
600 rm -f "$file.output.got"
609 if [ -s "$file.$stream.got" ]; then
612 cat "$file.$stream.got"