@@ -67,23 +67,23 @@ build_chainloader(){
6767}
6868
6969build_example (){
70- nix-build $CCACHE_FLAG example .nix
70+ nix-build $CCACHE_FLAG unikernel .nix
7171}
7272
7373multicore_subset (){
74- nix-shell --pure --arg smp true $CCACHE_FLAG --argstr unikernel ./test/kernel/integration/smp --run ./test.py
74+ nix-build ./unikernel.nix --arg smp true $CCACHE_FLAG --argstr unikernel ./test/kernel/integration/smp --arg doCheck true
7575
7676 # The following tests are not using multiple CPU's, but have been equippedd with some anyway
7777 # to make sure core functionality is not broken by missing locks etc. when waking up more cores.
78- nix-shell --pure --arg smp true $CCACHE_FLAG --argstr unikernel ./test/net/integration/udp --run ./test.py
79- nix-shell --pure --arg smp true $CCACHE_FLAG --argstr unikernel ./test/kernel/integration/paging --run ./test.py
78+ nix-shell ./unikernel.nix --arg smp true $CCACHE_FLAG --argstr unikernel ./test/net/integration/udp
79+ nix-build ./unikernel.nix --arg smp true $CCACHE_FLAG --argstr unikernel ./test/kernel/integration/paging --arg doCheck true
8080}
8181
8282smoke_tests (){
83- nix-shell --pure $CCACHE_FLAG --argstr unikernel ./test/net/integration/udp --run ./test.py
84- nix-shell --pure $CCACHE_FLAG --argstr unikernel ./test/net/integration/tcp --run ./test.py
85- nix-shell --pure $CCACHE_FLAG --argstr unikernel ./test/kernel/integration/paging --run ./test.py
86- nix-shell --pure $CCACHE_FLAG --argstr unikernel ./test/kernel/integration/smp --run ./test.py
83+ nix-build ./unikernel.nix $CCACHE_FLAG --argstr unikernel ./test/net/integration/udp
84+ nix-build ./unikernel.nix $CCACHE_FLAG --argstr unikernel ./test/net/integration/tcp
85+ nix-build ./unikernel.nix $CCACHE_FLAG --argstr unikernel ./test/kernel/integration/paging --arg doCheck true
86+ nix-build ./unikernel.nix $CCACHE_FLAG --argstr unikernel ./test/kernel/integration/smp --arg doCheck true
8787}
8888
8989run unittests " Build and run unit tests"
112112
113113# Continuing from here will run all integration tests.
114114
115+ sandboxed=true
115116run_testsuite () {
116117 local base_folder=" $1 "
117118 shift
@@ -151,7 +152,11 @@ run_testsuite() {
151152
152153
153154 # The command to run, as string to be able to print the fully expanded command
154- cmd=" nix-shell --pure $CCACHE_FLAG --argstr unikernel $subfolder --run ./test.py"
155+ if $sandboxed ; then
156+ cmd=" nix-build ./unikernel.nix $CCACHE_FLAG --argstr unikernel ${subfolder%/ } --arg doCheck true"
157+ else
158+ cmd=" nix-shell ./unikernel.nix $CCACHE_FLAG --argstr unikernel ${subfolder%/ } "
159+ fi
155160
156161 echo " "
157162 echo " 🚧 Step $steps .$substeps "
@@ -223,7 +228,9 @@ exclusions=(
223228 " websocket" # Linking fails, undefined ref to http_parser_parse_url, http_parser_execute
224229)
225230
231+ sandboxed=false
226232run_testsuite " ./test/net/integration" " ${exclusions[@]} "
233+ sandboxed=true
227234
228235echo -e " \n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
229236
0 commit comments