Browse Source

Added my own curl replacement for Windows (and Linux) and some more changes to Windows bat format

Yentl Van Tendeloo 9 years ago
parent
commit
1d909594aa
3 changed files with 27 additions and 18 deletions
  1. 10 13
      compile.bat
  2. 8 0
      curl.py
  3. 9 5
      run_tests.bat

+ 10 - 13
compile.bat

@@ -1,16 +1,13 @@
-#!/bin/bash
-set -e
-
-source library.sh
-
-address=$1
-filename=`realpath $2`
-username=$3
-modulename=$4
-mode=$5
+address=%1
+filename=%~f2
+username=%3
+modulename=%4
+mode=%5
 
 # Leave this here too, as the call might crash early
-curl $address -d "op=set_input&username=user_manager&element_type=V&value=\"$username\"" -s -S >> /dev/null
+set command="op=set_input&username=user_manager&element_type=V&value=\"%username%\""
+python curl.py %address% %command%
 
-cd interface/HUTN
-${python} hutn_compiler/compiler.py $filename grammars/actionlanguage.g $mode $username $modulename $filename $address
+cd interface\HUTN
+python hutn_compiler/compiler.py $filename grammars/actionlanguage.g %mode% %username% %modulename% %filename% %address%
+cd ..\..

+ 8 - 0
curl.py

@@ -0,0 +1,8 @@
+import urllib
+import urllib2
+import sys
+
+address = sys.argv[1]
+command = sys.argv[2]
+
+urllib2.urlopen(urllib2.Request(address, command)).read()

+ 9 - 5
run_tests.bat

@@ -1,16 +1,20 @@
-@echo off
+call flush_compiler_caches.bat
 
 cd state
-py.test --timeout=5
+py.test
 cd ..
 
+call generate_bootstrap.bat
+
 cd kernel
-py.test --timeout=10
+py.test
 cd ..
 
+call flush_compiler_caches.bat
+
 cd interface/HUTN
-py.test --timeout=10
+py.test
 cd ../..
 
-py.test --timeout=60 integration
+py.test integration
 pause