Fri Jan 10 01:39:32 2014 UTC ()
Undo previous; unfortunately the cleanup routine gets called in a different
shell so it can't cleanup stuff set in the environment of the first shell.
There are 2 problems:
	- calling the test routine directly does not cleanup (not using
	  atf-run)
	- when using atf-run, the cleanup routine needs state from the
	  running code which can only be stored in files. This will never
	  allow us to run tests in parallel since we need to keep a known
	  place to pass state.


(christos)
diff -r1.2 -r1.3 src/external/bsd/atf/dist/atf-sh/libatf-sh.subr

cvs diff -r1.2 -r1.3 src/external/bsd/atf/dist/atf-sh/libatf-sh.subr (expand / switch to unified diff)

--- src/external/bsd/atf/dist/atf-sh/libatf-sh.subr 2014/01/10 01:16:07 1.2
+++ src/external/bsd/atf/dist/atf-sh/libatf-sh.subr 2014/01/10 01:39:32 1.3
@@ -762,19 +762,18 @@ main() @@ -762,19 +762,18 @@ main()
762 # Run or list test cases. 762 # Run or list test cases.
763 if `${_lflag}`; then 763 if `${_lflag}`; then
764 if [ ${#} -gt 0 ]; then 764 if [ ${#} -gt 0 ]; then
765 _atf_syntax_error "Cannot provide test case names with -l" 765 _atf_syntax_error "Cannot provide test case names with -l"
766 fi 766 fi
767 _atf_list_tcs 767 _atf_list_tcs
768 else 768 else
769 if [ ${#} -eq 0 ]; then 769 if [ ${#} -eq 0 ]; then
770 _atf_syntax_error "Must provide a test case name" 770 _atf_syntax_error "Must provide a test case name"
771 elif [ ${#} -gt 1 ]; then 771 elif [ ${#} -gt 1 ]; then
772 _atf_syntax_error "Cannot provide more than one test case name" 772 _atf_syntax_error "Cannot provide more than one test case name"
773 else 773 else
774 _atf_run_tc "${1}" 774 _atf_run_tc "${1}"
775 _atf_run_tc "${1}:cleanup" 
776 fi 775 fi
777 fi 776 fi
778} 777}
779 778
780# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 779# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4