-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reftest: add env rewriting rules test for unix & windows
- Loading branch information
Showing
3 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
N0REP0 | ||
### : setenv & build env rewriting : | ||
### opam switch create rewriting --empty | ||
### <pkg:absent-rewrite.1> | ||
opam-version: "2.0" | ||
setenv: [ A_ENVSET = "/a/given/path" ] | ||
build-env: [ A_ENVBUILD = "/another/given/path" ] | ||
build: [ "sh" "-c" "env | grep A_ENV" ] | ||
### opam install absent-rewrite -vv | sed-cmd sh | ||
The following actions will be performed: | ||
=== install 1 package | ||
- install absent-rewrite 1 | ||
|
||
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> | ||
Processing 2/3: [absent-rewrite: sh env | grep A_ENV] | ||
sh "-c" "env | grep A_ENV" (CWD=${BASEDIR}/OPAM/rewriting/.opam-switch/build/absent-rewrite.1) | ||
- A_ENVBUILD=/another/given/path | ||
-> compiled absent-rewrite.1 | ||
-> installed absent-rewrite.1 | ||
Done. | ||
### opam env | grep "A_ENV" | ||
A_ENVSET='/a/given/path'; export A_ENVSET; | ||
### opam-cat OPAM/rewriting/.opam-switch/packages/absent-rewrite.1/opam | ||
build: ["sh" "-c" "env | grep A_ENV"] | ||
build-env: A_ENVBUILD = "/another/given/path" | ||
opam-version: "2.0" | ||
setenv: A_ENVSET = "/a/given/path" | ||
### <pkg:rewrite.1> | ||
opam-version: "2.0" | ||
setenv: [ R_ENVSET = "/a/given/path" ] | ||
build-env: [ R_ENVBUILD = "/another/given/path" ] | ||
build: [ "sh" "-c" "env | grep R_ENV" ] | ||
x-allow-env-path-rewrite-on-windows: true | ||
### opam install rewrite -vv | sed-cmd sh | ||
The following actions will be performed: | ||
=== install 1 package | ||
- install rewrite 1 | ||
|
||
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> | ||
Processing 2/3: [rewrite: sh env | grep R_ENV] | ||
sh "-c" "env | grep R_ENV" (CWD=${BASEDIR}/OPAM/rewriting/.opam-switch/build/rewrite.1) | ||
- R_ENVBUILD=/another/given/path | ||
-> compiled rewrite.1 | ||
-> installed rewrite.1 | ||
Done. | ||
### opam env | grep "R_ENV" | ||
R_ENVSET='/a/given/path'; export R_ENVSET; | ||
### opam-cat OPAM/rewriting/.opam-switch/packages/rewrite.1/opam | ||
build: ["sh" "-c" "env | grep R_ENV"] | ||
build-env: R_ENVBUILD = "/another/given/path" | ||
opam-version: "2.0" | ||
setenv: R_ENVSET = "/a/given/path" | ||
x-allow-env-path-rewrite-on-windows: true | ||
### <pkg:no-rewrite.1> | ||
opam-version: "2.0" | ||
setenv: [ N_ENVSET = "/a/given/path" ] | ||
build-env: [ N_ENVBUILD = "/another/given/path" ] | ||
build: [ "sh" "-c" "env | grep N_ENV" ] | ||
x-allow-env-path-rewrite-on-windows: false | ||
### opam install no-rewrite -vv | sed-cmd sh | ||
The following actions will be performed: | ||
=== install 1 package | ||
- install no-rewrite 1 | ||
|
||
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> | ||
Processing 2/3: [no-rewrite: sh env | grep N_ENV] | ||
sh "-c" "env | grep N_ENV" (CWD=${BASEDIR}/OPAM/rewriting/.opam-switch/build/no-rewrite.1) | ||
- N_ENVBUILD=/another/given/path | ||
-> compiled no-rewrite.1 | ||
-> installed no-rewrite.1 | ||
Done. | ||
### opam env | grep "N_ENV" | ||
N_ENVSET='/a/given/path'; export N_ENVSET; | ||
### opam-cat OPAM/rewriting/.opam-switch/packages/no-rewrite.1/opam | ||
build: ["sh" "-c" "env | grep N_ENV"] | ||
build-env: N_ENVBUILD = "/another/given/path" | ||
opam-version: "2.0" | ||
setenv: N_ENVSET = "/a/given/path" | ||
x-allow-env-path-rewrite-on-windows: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters