From 892d93c5f4c0bc0253f97caa8fc2be3c69b82f75 Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Sat, 23 Feb 2019 18:02:14 -0800 Subject: [PATCH] Update tests for more julia versions --- .../README.rst | 44 +++++++++---------- .../REQUIRE | 0 .../verify | 0 tests/julia/julia_version-1.0/README.rst | 5 +++ tests/julia/julia_version-1.0/REQUIRE | 4 ++ tests/julia/julia_version-1.0/verify | 17 +++++++ tests/julia/julia_version-1.1/README.rst | 5 +++ tests/julia/julia_version-1.1/REQUIRE | 4 ++ tests/julia/julia_version-1.1/verify | 17 +++++++ tests/julia/julia_version-1/verify | 2 +- 10 files changed, 75 insertions(+), 23 deletions(-) rename tests/julia/{julia_version => julia_version-0.6.3}/README.rst (96%) rename tests/julia/{julia_version => julia_version-0.6.3}/REQUIRE (100%) rename tests/julia/{julia_version => julia_version-0.6.3}/verify (100%) mode change 100755 => 100644 create mode 100644 tests/julia/julia_version-1.0/README.rst create mode 100644 tests/julia/julia_version-1.0/REQUIRE create mode 100644 tests/julia/julia_version-1.0/verify create mode 100644 tests/julia/julia_version-1.1/README.rst create mode 100644 tests/julia/julia_version-1.1/REQUIRE create mode 100644 tests/julia/julia_version-1.1/verify diff --git a/tests/julia/julia_version/README.rst b/tests/julia/julia_version-0.6.3/README.rst similarity index 96% rename from tests/julia/julia_version/README.rst rename to tests/julia/julia_version-0.6.3/README.rst index dbe9e336..ca4c2a71 100644 --- a/tests/julia/julia_version/README.rst +++ b/tests/julia/julia_version-0.6.3/README.rst @@ -1,22 +1,22 @@ -Julia - REQUIRE: packages and julia version number ---------------- - -To specify dependencies in Julia, include a REQUIRE file. - -To specify a version of Julia to be installed, the first line of the file must -follow the format `julia `. For example: -``` -julia 0.7 -``` - -To add package dependencies, the rest of the file can include lines that list -the names of packages you'd like to be installed. For example: - -``` -PyPlot -DataFrames -``` - -Note that `IJulia` is installed by default. - -These packages will all be installed, and then precompiled via `using`. +Julia - REQUIRE: packages and julia version number +--------------- + +To specify dependencies in Julia, include a REQUIRE file. + +To specify a version of Julia to be installed, the first line of the file must +follow the format `julia `. For example: +``` +julia 0.7 +``` + +To add package dependencies, the rest of the file can include lines that list +the names of packages you'd like to be installed. For example: + +``` +PyPlot +DataFrames +``` + +Note that `IJulia` is installed by default. + +These packages will all be installed, and then precompiled via `using`. diff --git a/tests/julia/julia_version/REQUIRE b/tests/julia/julia_version-0.6.3/REQUIRE similarity index 100% rename from tests/julia/julia_version/REQUIRE rename to tests/julia/julia_version-0.6.3/REQUIRE diff --git a/tests/julia/julia_version/verify b/tests/julia/julia_version-0.6.3/verify old mode 100755 new mode 100644 similarity index 100% rename from tests/julia/julia_version/verify rename to tests/julia/julia_version-0.6.3/verify diff --git a/tests/julia/julia_version-1.0/README.rst b/tests/julia/julia_version-1.0/README.rst new file mode 100644 index 00000000..02b8d969 --- /dev/null +++ b/tests/julia/julia_version-1.0/README.rst @@ -0,0 +1,5 @@ +Julia - REQUIRE: test version for julia v1.0 +--------------- + +Starting with julia v0.7 and up, the package manager has changed, so this tests +that the julia version can be specified and packages installed correctly. diff --git a/tests/julia/julia_version-1.0/REQUIRE b/tests/julia/julia_version-1.0/REQUIRE new file mode 100644 index 00000000..84c3b997 --- /dev/null +++ b/tests/julia/julia_version-1.0/REQUIRE @@ -0,0 +1,4 @@ +julia 1.0 + +# Julia packages: +Compat diff --git a/tests/julia/julia_version-1.0/verify b/tests/julia/julia_version-1.0/verify new file mode 100644 index 00000000..80e53b15 --- /dev/null +++ b/tests/julia/julia_version-1.0/verify @@ -0,0 +1,17 @@ +#!/usr/bin/env julia +# Verify the version: +if VERSION < v"1" || VERSION >= v"1.1" + exit(1) +end + +try + # Test that the package was installed. + using Compat + + # Verify that the environment variables are set correctly for julia 1.0+ + @assert "julia" ∈ readdir(Sys.BINDIR) +catch + exit(1) +end + +exit(0) diff --git a/tests/julia/julia_version-1.1/README.rst b/tests/julia/julia_version-1.1/README.rst new file mode 100644 index 00000000..02b8d969 --- /dev/null +++ b/tests/julia/julia_version-1.1/README.rst @@ -0,0 +1,5 @@ +Julia - REQUIRE: test version for julia v1.0 +--------------- + +Starting with julia v0.7 and up, the package manager has changed, so this tests +that the julia version can be specified and packages installed correctly. diff --git a/tests/julia/julia_version-1.1/REQUIRE b/tests/julia/julia_version-1.1/REQUIRE new file mode 100644 index 00000000..fe324aeb --- /dev/null +++ b/tests/julia/julia_version-1.1/REQUIRE @@ -0,0 +1,4 @@ +julia 1.1 + +# Julia packages: +Compat diff --git a/tests/julia/julia_version-1.1/verify b/tests/julia/julia_version-1.1/verify new file mode 100644 index 00000000..bea7f2ef --- /dev/null +++ b/tests/julia/julia_version-1.1/verify @@ -0,0 +1,17 @@ +#!/usr/bin/env julia +# Verify the version: +if VERSION < v"1.1" || VERSION >= v"1.2" + exit(1) +end + +try + # Test that the package was installed. + using Compat + + # Verify that the environment variables are set correctly for julia 1.0+ + @assert "julia" ∈ readdir(Sys.BINDIR) +catch + exit(1) +end + +exit(0) diff --git a/tests/julia/julia_version-1/verify b/tests/julia/julia_version-1/verify index 7fa11abf..7ad47d28 100755 --- a/tests/julia/julia_version-1/verify +++ b/tests/julia/julia_version-1/verify @@ -1,6 +1,6 @@ #!/usr/bin/env julia # Verify the version: -if VERSION < v"1" +if VERSION < v"1" || VERSION >= v"2" exit(1) end