Skip to content

Commit

Permalink
Remove opam version check within tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hernoufM committed May 4, 2023
1 parent 10ce16a commit f747797
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 18 deletions.
59 changes: 53 additions & 6 deletions tests/real/odoc.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ This test verify bundling of real package `odoc` with compiler version 4.02.3 an
$ export OPAMROOT=$PWD/OPAMROOT
$ export OPAMSTATUSLINE=never
$ export OPAMVERBOSE=-1
$ opam --version
2.1.4
$ opam-bundle odoc --ocaml=4.02.3 --opam=2.0 --self --yes 2>&1 | sed 's/arch =.*/arch = $ARCH/;s/os =.*/os = $OS/;s/os-distribution =.*/os-distribution = $OSDISTRIB/;s/os-version =.*/os-version = $OSVERSION/;s/os-family =.*/os-family = $OSFAMILLY/'
OCaml version is set to 4.02.3.
OPAM version is set to 2.0.10.
Expand Down Expand Up @@ -58,13 +56,62 @@ This test verify bundling of real package `odoc` with compiler version 4.02.3 an
<><> Getting all archives <><><><><><><><><><><><><><><><><><><><><><><><><><><>

<><> Getting bootstrap packages <><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] Opam archive at https://github.com/ocaml/opam/releases/download/2.0/opam-full-2.0.tar.gz could not be obtained: curl error code 404

<><> Building bundle ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Done. Bundle generated as $TESTCASE_ROOT/odoc-bundle.tar.gz
Self-extracting archive generated as $TESTCASE_ROOT/odoc-bundle.sh
$ sh ./odoc-bundle.sh -y
sh: 0: cannot open ./odoc-bundle.sh: No such file
This bundle will compile the application to $TESTCASE_ROOT/odoc-bundle, WITHOUT installing
wrappers anywhere else.

================ Bootstrap: checking for prerequisites ================

Checking for cc... found
Checking for make... found
Checking for wget curl... found
Checking for patch... found
Checking for unzip... found
Checking for bunzip2... found
Checking for rsync... found

================ Bootstrap: compiling OCaml ================

This may take a while. Output is in $TESTCASE_ROOT/odoc-bundle/bootstrap.log
Uncompressing...

Something went wrong, see log in $TESTCASE_ROOT/odoc-bundle/bootstrap.log
[2]
$ sh ./odoc-bundle/compile.sh ../ODOC
sh: 0: cannot open ./odoc-bundle/compile.sh: No such file
[2]
This bundle will compile the application to $TESTCASE_ROOT/odoc-bundle, and put wrappers into
../ODOC/bin. You will need to retain $TESTCASE_ROOT/odoc-bundle for the wrappers to work.

Press enter to continue...
================ Bootstrap: checking for prerequisites ================

Checking for cc... found
Checking for make... found
Checking for wget curl... found
Checking for patch... found
Checking for unzip... found
Checking for bunzip2... found
Checking for rsync... found

================ Bootstrap: compiling OCaml ================

This may take a while. Output is in $TESTCASE_ROOT/odoc-bundle/bootstrap.log
Uncompressing...

Something went wrong, see log in $TESTCASE_ROOT/odoc-bundle/bootstrap.log

================ Compile: installing packages ================

Output is in $TESTCASE_ROOT/odoc-bundle/compile.log
./odoc-bundle/compile.sh: 59: cannot create $TESTCASE_ROOT/odoc-bundle/bootstrap/bin/sudo: Directory nonexistent
chmod: cannot access '$TESTCASE_ROOT/odoc-bundle/bootstrap/bin/sudo': No such file or directory
Compiling packages...

Something went wrong, see log in $TESTCASE_ROOT/odoc-bundle/compile.log
[50]
$ ODOC/bin/odoc
ODOC/bin/odoc: not found
[127]
2 changes: 0 additions & 2 deletions tests/real/opam-bundle.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ This test verify bundling of real package `opam-bundle` of version 0.4.
$ export OPAMROOT=$PWD/OPAMROOT
$ export OPAMSTATUSLINE=never
$ export OPAMVERBOSE=-1
$ opam --version
2.1.4
$ opam-bundle "opam-bundle@https://github.com/AltGr/opam-bundle/archive/refs/tags/0.4.tar.gz" opam-client.2.0.10 --self --opam=2.1 --ocaml=4.14.0 --yes 2>&1 | sed 's/arch =.*/arch = $ARCH/;s/os =.*/os = $OS/;s/os-distribution =.*/os-distribution = $OSDISTRIB/;s/os-version =.*/os-version = $OSVERSION/;s/os-family =.*/os-family = $OSFAMILLY/'
OCaml version is set to 4.14.0.
OPAM version is set to 2.1.4.
Expand Down
2 changes: 0 additions & 2 deletions tests/stub/basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Repo initial setup with two packages `foo` and `bar` that depends on `foo` and o
$ export OPAMROOT=$PWD/OPAMROOT
$ export OPAMSTATUSLINE=never
$ export OPAMVERBOSE=-1
$ opam --version
2.1.4
$ cat > compile << EOF
> #!/bin/sh
> echo "I'm launching \$(basename \${0}) \$@!"
Expand Down
2 changes: 0 additions & 2 deletions tests/stub/env.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Repo initial setup with three packages `foo`, `bar`, and `baz`, with specific av
$ export OPAMROOT=$PWD/OPAMROOT
$ export OPAMSTATUSLINE=never
$ export OPAMVERBOSE=-1
$ opam --version
2.1.4
Stub executable
$ cat > compile << EOF
> #!/bin/sh
Expand Down
6 changes: 2 additions & 4 deletions tests/stub/packages.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Every package used is a stub package.
$ export OPAMROOT=$PWD/OPAMROOT
$ export OPAMSTATUSLINE=never
$ export OPAMVERBOSE=-1
$ opam --version
2.1.4
Different version of one stub executable
$ cat > compile << EOF
> #!/bin/sh
Expand Down Expand Up @@ -555,7 +553,7 @@ wrapper.

<><> Getting all archives <><><><><><><><><><><><><><><><><><><><><><><><><><><>
[WARNING] Extra source repo of foo.4 from file://./REPO/repo had no recorded checksum: adding md5=$HASH

<><> Getting bootstrap packages <><><><><><><><><><><><><><><><><><><><><><><><>

<><> Building bundle ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Expand All @@ -567,7 +565,7 @@ wrapper.
bar-bundle/common.sh
bar-bundle/compile.sh
bar-bundle/configure.sh
bar-bundle/opam-full-2.1.0-rc2.tar.gz
bar-bundle/opam-full-2.1.4.tar.gz
bar-bundle/repo/
bar-bundle/repo/archives/
bar-bundle/repo/archives/bar.3/
Expand Down
2 changes: 0 additions & 2 deletions tests/stub/repos.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Every package used is a stub package.
$ export OPAMROOT=$PWD/OPAMROOT
$ export OPAMSTATUSLINE=never
$ export OPAMVERBOSE=-1
$ opam --version
2.1.4
Stub executable
$ cat > compile << EOF
> #!/bin/sh
Expand Down

0 comments on commit f747797

Please sign in to comment.