comparison test/test_system.m @ 16019:5b2126a8c84f

install tests and functions to run them * configure.ac (octtestsdir): New variable. * build-aux/common.mk (octtestsdir): New variable. (do_subst_default_vals): Substitute it. (test-file-commands): New macro. (%.cc-tst:%.cc, %.yy-tst:%.yy, %.ll-tst:%.ll): New rules. * libinterp/Makefile.am (TST_FILES_SRC, TST_FILES, libinterptestsdir, nobase_libinterptests_DATA): New variables. * defaults.in.h (OCTAVE_OCTTESTSDIR): New macro. * liboctave/Makefile.am (LIBOCTAVE_TST_SRC, TST_FILES_SRC, TST_FILES, liboctavetestsdir, nobase_liboctavetests_DATA): New variables. * toplev.cc (Foctave_config_info): Include octtestsdir in the struct. * fntests.m: Look in topbuilddir for C++ test files. * __run_test_suite__.m: New function, extracted from test/fntests.m. Look for -tst files, not .cc files. Don't report -tst files that are missing tests (there won't be any). * __prog_output_assert__.m, __printf_assert__.m: New functions, extracted from __run_test_suite__.m and renamed from prog_output_assert and printf_assert. Change all uses. * scripts/testfun/module.mk (testfun_FCN_FILES): Include new files in the list. * test/Makefile.am (GENERATED_BC_OVERLOADS_DIRS, GENERATED_BC_OVERLOADS_FILES, fixedtestsdir, nobase_fixedtests_DATA): New variables. (CLEANFILES): Include $(GENERATED_BC_OVERRLOADS_FILES) in the list. (clean-local): Use $(GENERATED_BC_OVERLOADS_DIRS). * build_bc_overload_tests.sh: New options, --list-files, --list-dirs, and --list-classes. * test/classes/module.mk (classes_FCN_FILES): Include recently added .m files in the list. * test.m: Use "var" argument for exist in tests.
author John W. Eaton <jwe@octave.org>
date Fri, 08 Feb 2013 16:53:14 -0500
parents 7e198fe3732c
children
comparison
equal deleted inserted replaced
16018:e0df71fbe39b 16019:5b2126a8c84f
37 %! assert (toc () > 0); 37 %! assert (toc () > 0);
38 38
39 %% test/octave.test/system/pause-1.m 39 %% test/octave.test/system/pause-1.m
40 %!test 40 %!test
41 %! pause (0); 41 %! pause (0);
42 %! printf_assert ("ok\n"); 42 %! __printf_assert__ ("ok\n");
43 %! assert (prog_output_assert ("ok")); 43 %! assert (__prog_output_assert__ ("ok"));
44 44
45 %% test/octave.test/system/pause-2.m 45 %% test/octave.test/system/pause-2.m
46 %!error <Invalid call to pause> pause (1, 2) 46 %!error <Invalid call to pause> pause (1, 2)
47 47
48 %% test/octave.test/system/sleep-1.m 48 %% test/octave.test/system/sleep-1.m
49 %!test 49 %!test
50 %! sleep (0); 50 %! sleep (0);
51 %! printf_assert ("ok\n"); 51 %! __printf_assert__ ("ok\n");
52 %! assert (prog_output_assert ("ok")); 52 %! assert (__prog_output_assert__ ("ok"));
53 53
54 %% test/octave.test/system/sleep-2.m 54 %% test/octave.test/system/sleep-2.m
55 %!error <Invalid call to sleep> sleep () 55 %!error <Invalid call to sleep> sleep ()
56 56
57 %% test/octave.test/system/sleep-3.m 57 %% test/octave.test/system/sleep-3.m
58 %!error <Invalid call to sleep> sleep (1, 2) 58 %!error <Invalid call to sleep> sleep (1, 2)
59 59
60 %% test/octave.test/system/usleep-1.m 60 %% test/octave.test/system/usleep-1.m
61 %!test 61 %!test
62 %! usleep (0); 62 %! usleep (0);
63 %! printf_assert ("ok\n"); 63 %! __printf_assert__ ("ok\n");
64 %! assert (prog_output_assert ("ok")); 64 %! assert (__prog_output_assert__ ("ok"));
65 65
66 %% test/octave.test/system/usleep-2.m 66 %% test/octave.test/system/usleep-2.m
67 %!error <Invalid call to usleep> usleep () 67 %!error <Invalid call to usleep> usleep ()
68 68
69 %% test/octave.test/system/usleep-3.m 69 %% test/octave.test/system/usleep-3.m