From e0674c7824b806ef614acb408aca3c3b3efa7c2a Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Thu, 31 Mar 2011 11:04:37 -0400 Subject: Add unit tests for the parser This changeset adds support for JUnit4 tests to icedtea-web. It also adds some parser tests that check that the parser works. make check will now run these tests if JUnit is available. 2011-03-31 Omair Majid Add unit tests for the parser * Makefile.am: Add TESTS_DIR,TESTS_SRCDIR, NETX_UNIT_TEST_DIR, and NETX_UNIT_TEST_SRCDIR, JUNIT_RUNNER_DIR, JUNIT_RUNNER_SRCDIR, and JUNIT_RUNNER_JAR. Conditionally define RHINO_TESTS and UNIT_TESTS. (clean-local): Use RHINO_TESTS and UNIT_TESTS. (clean-tests): Depend on clean-netx-tests. Delete directory. (junit-runner-source-files.txt, $(JUNIT_RUNNER_JAR)), (next-unit-tests-sources-files.txt stamps/netx-unit-tests-compile.stamp), (run-netx-unit-tests, clean-netx-tests, clean-junit-runner) (clean-netx-unit-tests): New targets. * configure.ac: Add new optional dependency on junit. * tests/junit-runner/CommandLine.java, * tests/junit-runner/LessVerboseTextListener.java, * tests/junit-runner/README, * tests/netx/unit/net/sourceforge/jnlp/ParserBasicTests.java, * tests/netx/unit/net/sourceforge/jnlp/ParserCornerCaseTests.java, * tests/netx/unit/net/sourceforge/jnlp/ParserMalformedXmlTests.java, * tests/netx/unit/net/sourceforge/jnlp/basic.jnlp: New files. --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 850b293..a0950e4 100644 --- a/configure.ac +++ b/configure.ac @@ -85,6 +85,8 @@ IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE IT_FIND_OPTIONAL_JAR([rhino], RHINO, [/usr/share/java/js.jar /usr/share/rhino-1.6/lib/js.jar]) +IT_FIND_OPTIONAL_JAR([junit], JUNIT, + [/usr/share/java/junit4.jar]) AC_CONFIG_FILES([jrunscript], [chmod u+x jrunscript]) AC_CONFIG_FILES([build.properties]) -- cgit v1.2.3