OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 3 # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE.md file. | 5 # BSD-style license that can be found in the LICENSE.md file. |
6 | 6 |
7 set -eu | 7 set -eu |
8 | 8 |
9 THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | 9 THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) |
10 ROOT_DIR=$(cd "$THIS_DIR/../.." && pwd) | 10 ROOT_DIR=$(cd "$THIS_DIR/../.." && pwd) |
(...skipping 21 matching lines...) Loading... |
32 | 32 |
33 function print_error() { | 33 function print_error() { |
34 echo "Error: $1" | 34 echo "Error: $1" |
35 print_help | 35 print_help |
36 exit 1 | 36 exit 1 |
37 } | 37 } |
38 | 38 |
39 function build() { | 39 function build() { |
40 SUFFIX=service_tests/simple_todo_$1 | 40 SUFFIX=service_tests/simple_todo_$1 |
41 OUT="$ROOT_DIR/out/${MODE_CC}${ARCH_UC}/temporary_test_output/$SUFFIX" | 41 OUT="$ROOT_DIR/out/${MODE_CC}${ARCH_UC}/temporary_test_output/$SUFFIX" |
42 $TEST_PY -a $ARCH -m $MODE fletch_tests/$SUFFIX | 42 $TEST_PY -a $ARCH -m $MODE dartino_tests/$SUFFIX |
43 echo | 43 echo |
44 echo "Compilation and testing succeeded" | 44 echo "Compilation and testing succeeded" |
45 echo "Compiled output in" | 45 echo "Compiled output in" |
46 echo " $OUT" | 46 echo " $OUT" |
47 } | 47 } |
48 | 48 |
49 while [[ $# > 1 ]]; do | 49 while [[ $# > 1 ]]; do |
50 case "$1" in | 50 case "$1" in |
51 -a|--arch) ARCH="$2"; shift 2;; | 51 -a|--arch) ARCH="$2"; shift 2;; |
52 -m|--mode) MODE="$2"; shift 2;; | 52 -m|--mode) MODE="$2"; shift 2;; |
(...skipping 27 matching lines...) Loading... |
80 fi | 80 fi |
81 build java | 81 build java |
82 LD_LIBRARY_PATH=$OUT \ | 82 LD_LIBRARY_PATH=$OUT \ |
83 java -d64 -ea -cp $OUT/simple_todo.jar -Djava.library.path=$OUT \ | 83 java -d64 -ea -cp $OUT/simple_todo.jar -Djava.library.path=$OUT \ |
84 SimpleTodo $OUT/simple_todo.snapshot | 84 SimpleTodo $OUT/simple_todo.snapshot |
85 ;; | 85 ;; |
86 *) | 86 *) |
87 print_error "unknown target '$TARGET'" | 87 print_error "unknown target '$TARGET'" |
88 ;; | 88 ;; |
89 esac | 89 esac |
OLD | NEW |