File tree Expand file tree Collapse file tree 3 files changed +19
-11
lines changed
Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -134,15 +134,12 @@ jobs:
134134 run : cmake -E make_directory ${{runner.workspace}}/build
135135
136136 - name : Install dependencies
137- run : brew install coreutils libpcap netcat # sdl2 libx11
138-
139- - name : gnu tr
140- run : sudo mv /usr/local/opt/coreutils/libexec/gnubin/tr /usr/bin/tr
137+ run : brew install libpcap netcat gnu-sed # sdl2 libx11 / sdl doesnt work see #44
141138
142139 - name : Configure CMake
143140 shell : bash
144141 working-directory : ${{runner.workspace}}/build
145- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall -Wc++11-extensions -Wc++11-long-long -Wc++11-extra-semi - std=c++11 -stdlib=libc++ -I/usr/local/opt/libpcap/include"
142+ run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall -std=c++11 -stdlib=libc++ -I/usr/local/opt/libpcap/include"
146143
147144 - name : Build
148145 working-directory : ${{runner.workspace}}/build
@@ -151,10 +148,15 @@ jobs:
151148 env :
152149 MAKEFLAGS : " -j2"
153150
151+ - name : Run test scripts
152+ working-directory : ${{runner.workspace}}/axpbox
153+ shell : bash
154+ run : ${{runner.workspace}}/axpbox/test/run
155+
154156 - name : Upload AXPbox Binary
155157 uses : actions/upload-artifact@v1
156158 with :
157- name : AXPbox-osx-appleclang-${{ env.BUILD_DATE }}
159+ name : AXPbox-osx-10.15- appleclang-${{ env.BUILD_DATE }}
158160 path : ${{runner.workspace}}/build/axpbox
159161 env :
160162 BUILD_DATE : ${{ steps.date.outputs.date }}
Original file line number Diff line number Diff line change 2020chmod 700 disk-unwritable.img
2121rm disk-unwritable.img
2222
23- sed -i -e ' s$/[^ ]*/DiskFile.cpp$DiskFile.cpp$g' \
24- -e ' s/line [0-9]*/line L/g' -e ' /$Id/d' axp.log
23+ # OS X github runner has weiro sed version, use gnu one there.
24+ SED=/usr/bin/sed
25+ if [[ -f " /usr/local/opt/gnu-sed/libexec/gnubin/sed" ]]; then
26+ SED=/usr/local/opt/gnu-sed/libexec/gnubin/sed
27+ fi
28+
29+ ${SED} -i -e ' s$/[^ ]*/DiskFile.cpp$DiskFile.cpp$g' -e ' s/line [0-9]*/line L/g' -e ' /$Id/d' axp.log
2530
2631echo -n -e ' \033[1;31m'
2732diff -c axp_correct.log axp.log && echo -e ' \033[1;32mdiff clean\033[0m'
Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ else # Travis
1616fi
1717
1818# Wait for AXPbox to start
19- sleep 3
19+ sleep 5
2020
2121# Connect to terminal
2222nc -t 127.0.0.1 21000 | tee axp.log &
2323NETCAT_PID=$!
2424
2525# Wait for the last line of log to become P00>>>
26- timeout=300
26+ timeout=100
2727while true
2828do
2929 if [ $timeout -eq 0 ]
3232 exit 1
3333 fi
3434
35- if [ " $( tail -n 1 axp.log | LC_ALL=C tr -d ' \0' ) " == " P00>>>" ]
35+ # print last line and remove null byte from it
36+ if [ " $( LC_ALL=C sed -n ' $p' axp.log | LC_ALL=C sed ' s/\x00//g' ) " == " P00>>>" ]
3637 then
3738 echo
3839 break
You can’t perform that action at this time.
0 commit comments