# HG changeset patch # User Rob Landley # Date 1212620580 18000 # Node ID 1a70dfe0a436ef20206451b5c3602f591e3ac349 # Parent cffc6d6ff459c0dda5a53a88a775b26682bea222 Quick smoke test for system image: ./smoketest.sh $ARCH | grep 'Hello world!' The result should be "Hello world!". (Also acts as a template for driving a qemu instance from a script.) diff -r cffc6d6ff459 -r 1a70dfe0a436 smoketest.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/smoketest.sh Wed Jun 04 18:03:00 2008 -0500 @@ -0,0 +1,24 @@ +#!/bin/bash + +# This script compiles stuff under the final system, using distcc to call out +# to the cross compiler. + +# Note that the first line of the script is a few spaces followed by a comment +# character. This gives some harmless data for the linux boot process to +# consume and discard before it gets to the command prompt. I don't know why +# it does this, but it does. The comment character is so you can see how +# much got eaten, generally about 3 characters. + +# If you cat your own script into emulator-build.sh, you probably also need +# to start with a line of spaces like that. Just FYI. + +./emulator-build.sh $1 << 'EOF' + # +# Show free space +df +# Smoke test for the compiler +gcc -s /tools/src/thread-hello2.c -lpthread && +./a.out +sync +exit +EOF