view tools/ecsx @ 1:b683d796e07e tip basis

Added generated Keiko files
author Mike Spivey <>
date Mon, 10 Sep 2018 20:34:00 +0100
parents 5dd13b8deb54
line wrap: on
line source

# Usage: ecsx b.s pas0.c
ARMGCC='arm-linux-gnueabihf-gcc -marm -march=armv6'

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

# Remote temp directory for this test

# 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
  # 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