annotate run-from-build.sh @ 778:e373d2b6d0b8

Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
author Rob Landley <rob@landley.net>
date Fri, 03 Jul 2009 05:29:11 -0500
parents d0157468f73d
children 6caf372a8b12
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
333
77c10235464d Simple script to run mini-native under its emulator, with distcc hooked
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
77c10235464d Simple script to run mini-native under its emulator, with distcc hooked
Rob Landley <rob@landley.net>
parents:
diff changeset
2
669
1cf41855bb85 More error checking.
Rob Landley <rob@landley.net>
parents: 649
diff changeset
3 source sources/include.sh || exit 1
636
d658f28e36ae Move adding /sbin to $PATH to run-from-build.sh.
Rob Landley <rob@landley.net>
parents: 613
diff changeset
4
746
93f2e856357e Missed a script that needs to call read_arch_dir now.
Rob Landley <rob@landley.net>
parents: 744
diff changeset
5 read_arch_dir "$1"
93f2e856357e Missed a script that needs to call read_arch_dir now.
Rob Landley <rob@landley.net>
parents: 744
diff changeset
6
744
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 678
diff changeset
7 SYSDIR="${BUILD}/system-image-$ARCH_NAME"
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 678
diff changeset
8
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 678
diff changeset
9 if [ ! -f "$SYSDIR/run-emulator.sh" ]
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 678
diff changeset
10 then
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 678
diff changeset
11 [ -z "$FAIL_QUIET" ] && echo "No $SYSDIR/run-emulator.sh" >&2
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 678
diff changeset
12 exit 1
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 678
diff changeset
13 fi
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 678
diff changeset
14
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 678
diff changeset
15 cd "$SYSDIR" || exit 1
446
06a005fcdacc Teach emulator-build.sh to fsck the root filesystem before running it.
Rob Landley <rob@landley.net>
parents: 356
diff changeset
16
06a005fcdacc Teach emulator-build.sh to fsck the root filesystem before running it.
Rob Landley <rob@landley.net>
parents: 356
diff changeset
17 # A little paranoia.
590
8e7db79a3d75 Make initramfs work, add "--memory MEGS" option to ./run-emulator.sh and make run-from-build.sh use it.
Rob Landley <rob@landley.net>
parents: 585
diff changeset
18 [ -f "image-${ARCH}.ext2" ] && fsck.ext2 -y "image-${ARCH}.ext2" </dev/null
446
06a005fcdacc Teach emulator-build.sh to fsck the root filesystem before running it.
Rob Landley <rob@landley.net>
parents: 356
diff changeset
19
06a005fcdacc Teach emulator-build.sh to fsck the root filesystem before running it.
Rob Landley <rob@landley.net>
parents: 356
diff changeset
20 # And run it, using the distccd we built (if necessary) and the cross-compiler.
06a005fcdacc Teach emulator-build.sh to fsck the root filesystem before running it.
Rob Landley <rob@landley.net>
parents: 356
diff changeset
21
778
e373d2b6d0b8 Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents: 751
diff changeset
22 trap "killtree $$" EXIT
751
d0157468f73d Prevent smoketest-all.sh from hanging if an individual smoketest.sh doesn't exit properly.
Rob Landley <rob@landley.net>
parents: 746
diff changeset
23
678
ea25e4da724e Path cleanup: host-tools.sh should handle this now.
Rob Landley <rob@landley.net>
parents: 669
diff changeset
24 ./run-emulator.sh --make-hdb 2048 --memory 256 --with-distcc \
ea25e4da724e Path cleanup: host-tools.sh should handle this now.
Rob Landley <rob@landley.net>
parents: 669
diff changeset
25 "${BUILD}/cross-compiler-${ARCH}"