This is an automated email from the ASF dual-hosted git repository. joshtynjala pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push: new bcd2276 CoreJS, BasicJS, RoyaleUnitJS tests: checks that path to royaleunit.browser is valid and supports skip-tests property bcd2276 is described below commit bcd2276f0fd201608e7186e6666655f94e352457 Author: Josh Tynjala <joshtynj...@apache.org> AuthorDate: Thu May 23 10:01:00 2019 -0700 CoreJS, BasicJS, RoyaleUnitJS tests: checks that path to royaleunit.browser is valid and supports skip-tests property --- .../js/projects/BasicJS/src/test/royale/build.xml | 17 ++++++++++++++++- frameworks/js/projects/CoreJS/src/test/royale/build.xml | 17 ++++++++++++++++- .../js/projects/RoyaleUnitJS/src/test/royale/build.xml | 17 ++++++++++++++++- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/frameworks/js/projects/BasicJS/src/test/royale/build.xml b/frameworks/js/projects/BasicJS/src/test/royale/build.xml index aea3531..986c180 100644 --- a/frameworks/js/projects/BasicJS/src/test/royale/build.xml +++ b/frameworks/js/projects/BasicJS/src/test/royale/build.xml @@ -139,7 +139,22 @@ </mxmlc> </target> - <target name="test" if="royaleunit.browser"> + <target name="check-royaleunit-browser" if="royaleunit.browser" unless="skip-tests"> + <!-- + if the royaleunit.browser property was provided manually, + check if the file actually exists + --> + <condition property="royaleunit.browser.exists"> + <and> + <isset property="royaleunit.browser" /> + <available file="${royaleunit.browser}" type="file" /> + </and> + </condition> + + <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: "${royaleunit.browser}". To skip RoyaleUnit tests, use -Dskip-tests." /> + </target> + + <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests"> <!-- Load the <royaleunit> task. We can't do this at the <project> level --> <!-- because targets that run before royaleUnitTasks.jar gets built would fail. --> <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/> diff --git a/frameworks/js/projects/CoreJS/src/test/royale/build.xml b/frameworks/js/projects/CoreJS/src/test/royale/build.xml index e297c88..f986a1d 100644 --- a/frameworks/js/projects/CoreJS/src/test/royale/build.xml +++ b/frameworks/js/projects/CoreJS/src/test/royale/build.xml @@ -139,7 +139,22 @@ </mxmlc> </target> - <target name="test" if="royaleunit.browser"> + <target name="check-royaleunit-browser" if="royaleunit.browser" unless="skip-tests"> + <!-- + if the royaleunit.browser property was provided manually, + check if the file actually exists + --> + <condition property="royaleunit.browser.exists"> + <and> + <isset property="royaleunit.browser" /> + <available file="${royaleunit.browser}" type="file" /> + </and> + </condition> + + <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: "${royaleunit.browser}". To skip RoyaleUnit tests, use -Dskip-tests." /> + </target> + + <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests"> <!-- Load the <royaleunit> task. We can't do this at the <project> level --> <!-- because targets that run before royaleUnitTasks.jar gets built would fail. --> <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/> diff --git a/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml b/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml index 6619f41..ef954c6 100644 --- a/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml +++ b/frameworks/js/projects/RoyaleUnitJS/src/test/royale/build.xml @@ -139,7 +139,22 @@ </mxmlc> </target> - <target name="test" if="royaleunit.browser"> + <target name="check-royaleunit-browser" if="royaleunit.browser" unless="skip-tests"> + <!-- + if the royaleunit.browser property was provided manually, + check if the file actually exists + --> + <condition property="royaleunit.browser.exists"> + <and> + <isset property="royaleunit.browser" /> + <available file="${royaleunit.browser}" type="file" /> + </and> + </condition> + + <fail unless="royaleunit.browser.exists" message="Invalid royaleunit.browser path: "${royaleunit.browser}". To skip RoyaleUnit tests, use -Dskip-tests." /> + </target> + + <target name="test" depends="check-royaleunit-browser" if="royaleunit.browser.exists" unless="skip-tests"> <!-- Load the <royaleunit> task. We can't do this at the <project> level --> <!-- because targets that run before royaleUnitTasks.jar gets built would fail. --> <taskdef resource="royaleUnitTasks.tasks" classpathref="lib.path"/>