Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nora Puchreiner
Nix
Commits
f459ca54
Commit
f459ca54
authored
4 years ago
by
Matthew Kenigsberg
Browse files
Options
Downloads
Patches
Plain Diff
rename run to shell in tests
parent
5d8504b9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/local.mk
+1
-1
1 addition, 1 deletion
tests/local.mk
tests/shell-hello.nix
+0
-0
0 additions, 0 deletions
tests/shell-hello.nix
tests/shell.sh
+28
-0
28 additions, 0 deletions
tests/shell.sh
with
29 additions
and
1 deletion
tests/local.mk
+
1
−
1
View file @
f459ca54
...
@@ -21,7 +21,7 @@ nix_tests = \
...
@@ -21,7 +21,7 @@ nix_tests = \
fetchGitSubmodules.sh
\
fetchGitSubmodules.sh
\
fetchMercurial.sh
\
fetchMercurial.sh
\
signing.sh
\
signing.sh
\
run
.sh
\
shell
.sh
\
brotli.sh
\
brotli.sh
\
pure-eval.sh
\
pure-eval.sh
\
check.sh
\
check.sh
\
...
...
This diff is collapsed.
Click to expand it.
tests/
run
.nix
→
tests/
shell-hello
.nix
+
0
−
0
View file @
f459ca54
File moved
This diff is collapsed.
Click to expand it.
tests/
run
.sh
→
tests/
shell
.sh
+
28
−
0
View file @
f459ca54
...
@@ -3,8 +3,8 @@ source common.sh
...
@@ -3,8 +3,8 @@ source common.sh
clearStore
clearStore
clearCache
clearCache
nix
run
-f
run
.nix hello
-c
hello |
grep
'Hello World'
nix
shell
-f
shell-hello
.nix hello
-c
hello |
grep
'Hello World'
nix
run
-f
run
.nix hello
-c
hello NixOS |
grep
'Hello NixOS'
nix
shell
-f
shell-hello
.nix hello
-c
hello NixOS |
grep
'Hello NixOS'
if
!
canUseSandbox
;
then
exit
;
fi
if
!
canUseSandbox
;
then
exit
;
fi
...
@@ -13,15 +13,15 @@ rm -rf $TEST_ROOT/store0
...
@@ -13,15 +13,15 @@ rm -rf $TEST_ROOT/store0
clearStore
clearStore
path
=
$(
nix
eval
--raw
-f
run
.nix hello
)
path
=
$(
nix
eval
--raw
-f
shell-hello
.nix hello
)
# Note: we need the sandbox paths to ensure that the shell is
# Note: we need the sandbox paths to ensure that the shell is
# visible in the sandbox.
# visible in the sandbox.
nix
run
--sandbox-build-dir
/build-tmp
\
nix
shell
--sandbox-build-dir
/build-tmp
\
--sandbox-paths
'/nix? /bin? /lib? /lib64? /usr?'
\
--sandbox-paths
'/nix? /bin? /lib? /lib64? /usr?'
\
--store
$TEST_ROOT
/store0
-f
run
.nix hello
-c
hello |
grep
'Hello World'
--store
$TEST_ROOT
/store0
-f
shell-hello
.nix hello
-c
hello |
grep
'Hello World'
path2
=
$(
nix
run
--sandbox-paths
'/nix? /bin? /lib? /lib64? /usr?'
--store
$TEST_ROOT
/store0
-f
run
.nix hello
-c
$SHELL
-c
'type -p hello'
)
path2
=
$(
nix
shell
--sandbox-paths
'/nix? /bin? /lib? /lib64? /usr?'
--store
$TEST_ROOT
/store0
-f
shell-hello
.nix hello
-c
$SHELL
-c
'type -p hello'
)
[[
$path
/bin/hello
=
$path2
]]
[[
$path
/bin/hello
=
$path2
]]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment