Skip to content

Commit 92137cb

Browse files
committed
make test more portable
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
1 parent 44839b6 commit 92137cb

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

test/mason/publish/use-local-registry/localRegistry.good

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
+++ dirname /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/localRegistry.masontest
2-
++ cd /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry
1+
+++ dirname $CHPL_HOME/test/mason/publish/use-local-registry/localRegistry.masontest
2+
++ cd $CHPL_HOME/test/mason/publish/use-local-registry
33
++ pwd
4-
+ CWD=/Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry
5-
+ REG=/Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg
4+
+ CWD=$CHPL_HOME/test/mason/publish/use-local-registry
5+
+ REG=$CHPL_HOME/test/mason/publish/use-local-registry/local-reg
66
+ cd myDep
7-
+ git init
8-
Initialized empty Git repository in /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/myDep/.git/
7+
+ git init -b main
8+
Initialized empty Git repository in $CHPL_HOME/test/mason/publish/use-local-registry/myDep/.git/
99
+ git add .
1010
+ git commit -m 'initial commit'
11-
+ mason publish --create-registry /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg
12-
Initialized local registry at /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg
11+
+ mason publish --create-registry $CHPL_HOME/test/mason/publish/use-local-registry/local-reg
12+
Initialized local registry at $CHPL_HOME/test/mason/publish/use-local-registry/local-reg
1313
Add this registry to MASON_REGISTRY environment variable to include it in search path:
14-
export MASON_REGISTRY="mason-registry|https://github.com/chapel-lang/mason-registry,local-reg|/Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg"
15-
+ mason publish --create-registry /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg
16-
Registry already exists at /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg
14+
export MASON_REGISTRY="mason-registry|https://github.com/chapel-lang/mason-registry,local-reg|$CHPL_HOME/test/mason/publish/use-local-registry/local-reg"
15+
+ mason publish --create-registry $CHPL_HOME/test/mason/publish/use-local-registry/local-reg
16+
Registry already exists at $CHPL_HOME/test/mason/publish/use-local-registry/local-reg
1717
+ echo 'error as expected: 1'
1818
error as expected: 1
19-
+ mason publish /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg
20-
Successfully published package to /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg
21-
+ mason publish /Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg
19+
+ mason publish $CHPL_HOME/test/mason/publish/use-local-registry/local-reg
20+
Successfully published package to $CHPL_HOME/test/mason/publish/use-local-registry/local-reg
21+
+ mason publish $CHPL_HOME/test/mason/publish/use-local-registry/local-reg
2222
A package with that name and version number already exists in the Bricks.
23-
+ export 'MASON_REGISTRY=my-local-registry|/Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg'
24-
+ MASON_REGISTRY='my-local-registry|/Users/jade/Development/chapel-lang/chapel/test/mason/publish/use-local-registry/local-reg'
23+
+ export 'MASON_REGISTRY=my-local-registry|$CHPL_HOME/test/mason/publish/use-local-registry/local-reg'
24+
+ MASON_REGISTRY='my-local-registry|$CHPL_HOME/test/mason/publish/use-local-registry/local-reg'
2525
+ mason search
2626
Updating my-local-registry
2727
myDep (0.1.0)

test/mason/publish/use-local-registry/localRegistry.masontest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ REG="$CWD/local-reg"
55
cd myDep
66

77
# make a local repo so the dep can be published
8-
git init
8+
git init -b main
99
git add .
1010
git commit -m "initial commit"
1111

test/mason/publish/use-local-registry/localRegistry.prediff

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ mv $OUTFILE.tmp $OUTFILE
77

88
sed -e '/initial commit$/d' -e '/insertions/d' -e '/create mode/d' $OUTFILE > $OUTFILE.tmp
99
mv $OUTFILE.tmp $OUTFILE
10+
11+
sed -e "s|$CHPL_HOME|\$CHPL_HOME|g" $OUTFILE > $OUTFILE.tmp
12+
mv $OUTFILE.tmp $OUTFILE

0 commit comments

Comments
 (0)