view tools/ecsx @ 1:b683d796e07e tip basis

Added generated Keiko files
author Mike Spivey <mike@cs.ox.ac.uk>
date Mon, 10 Sep 2018 20:34:00 +0100
parents 5dd13b8deb54
children
line wrap: on
line source
#!/bin/bash

# Usage: ecsx b.s pas0.c

HOST=ecs.ox.ac.uk
ARMGCC='arm-linux-gnueabihf-gcc -marm -march=armv6'
QEMU=qemu-arm

# Make sure socket directory exists
mkdir -p ~/.ssh/sockets

# Remote temp directory for this test
dir="ecsx-$$"

# Form a batch job
( echo /bin/mkdir -p $dir
  # Create source files
  for f in $*; do
      echo "/bin/cat >$dir/$f <<\\EOF"
      cat $f
      echo EOF
  done
  # Compile and run
  echo "(cd $dir; set -x;
		$ARMGCC $* -static -o b.out && $QEMU ./b.out)"
  # Delete the directory
  echo /bin/rm -rf $dir ) \
    |
# Submit it to the server, reusing a previous connection if possible
    ssh -o 'ControlMaster auto' -o 'ControlPath ~/.ssh/sockets/%r@%h-%p' \
          -o 'ControlPersist 600' $HOST /bin/bash