-
Notifications
You must be signed in to change notification settings - Fork 7
/
jenkinshook
38 lines (34 loc) · 1.19 KB
/
jenkinshook
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# This script assumes you have set JENKINSHOME
# in the environment. If you have not it will fail, which
# will be quickly caught by jenkins, so there's no checking.
. $JENKINSHOME/.bashrc
echo "WARNING:This will fail if $NXM/xbin is in your PATH"
set -e
go version
9c --version
cp /$JENKINSHOME/mkconfig.jenkins inferno-os/mkconfig
sh BUILDTOOLCHAIN
# `special` system like suse want . files fully qualified
. ./SETUP
cd sys/src
mk nuke
mk libs
mk install
mk kernels
# Boot the kernel and see if the output we get makes sense
# qemu must be in your path of course. It can be
# the standard command or a shell script to make things
# run correctly. On coreboot.org on my account it is
# a shell script.
# timeout will return non-zero if something goes wrong, but
# I think we'll want to get the diff output rather than bailing
# out immediately
set +e
timeout 90s qemu-system-x86_64 --kernel nxm/k10/9k8regression.elf \
-no-reboot --nographic -m 512 </dev/null > qemuout
set -e
# things are not always identical. We need to do some filtering.
# For now, just filter on the regression tests themselves.
sed '1,/Morning/d' qemuout | sed 's/badsyscall.*://' | /usr/bin/diff -bw - correctoutput
date