marking1/drumb_test.sh
author Christian Urban <urbanc@in.tum.de>
Sat, 17 Nov 2018 22:39:02 +0000
changeset 210 63a1376cbebd
parent 169 b37052895281
child 261 8997430d9765
permissions -rwxr-xr-x
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
#!/bin/bash
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     2
set -euo pipefail
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     3
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
out=${1:-output}
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
     7
# read marks for CW6 part 1
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
     8
marks=$(( `tail -1 $out` ))
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    10
echo $marks
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    11
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    12
echo "" >> $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    13
echo "Below is the feedback for your submission drumb.scala" >> $out
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
echo "" >> $out
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    16
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
# compilation tests
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
function scala_compile {
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    20
    (ulimit -t 60; JAVA_OPTS="-Xmx1g" scala "$1" 2> /dev/null 1> /dev/null)
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
}
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
# functional tests
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
function scala_assert {
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    26
    (ulimit -t 60; JAVA_OPTS="-Xmx4g" scala -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null)
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
}
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    29
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
# purity test
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
function scala_vars {
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    33
   (egrep '\bvar\b|\breturn\b|\.par|ListBuffer|mutable|new Array' "$1" 2> /dev/null 1> /dev/null)
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
}
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    37
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
# var, .par return, ListBuffer test
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
#
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    40
echo "drumb.scala does not contain vars, returns, Arrays, ListBuffers etc?" | tee -a $out
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
if (scala_vars drumb.scala)
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
then
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    44
  echo "  --> test failed" | tee -a $out
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
  tsts0=$(( 1 ))
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
else
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    47
  echo "  --> success" | tee -a $out
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
  tsts0=$(( 0 )) 
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
fi
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
# compilation test
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
if  [ $tsts0 -eq 0 ]
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
then 
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    55
  echo "drumb.scala runs?" | tee -a $out
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    57
  if (scala_compile drumb.scala)
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
  then
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    59
    echo "  --> success" | tee -a $out
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
    tsts=$(( 0 ))
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
  else
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    62
    echo "  --> scala drumb.scala did not run successfully" | tee -a $out
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
    tsts=$(( 1 )) 
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
  fi
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
else
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
  tsts=$(( 1 ))     
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
fi
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    69
### get january tests
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    71
if [ $tsts -eq 0 ]
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    72
then
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    73
  echo "  get_january_data(\"GOOG\", 1980) == List()" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    74
  echo "  get_january_data(\"GOOG\", 2010).head == \"2010-01-04,311.349976\"" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    75
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    76
  if (scala_assert "drumb.scala" "drumb_test1.scala")
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    77
  then
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    78
      echo "  --> success" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    79
      marks=$(( marks + 1 ))
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    80
  else
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    81
      echo "  --> test failed" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    82
  fi
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    83
fi
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    84
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    85
### get first price tests
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    86
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    87
if [ $tsts -eq 0 ]
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    88
then
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    89
  echo "  get_first_price(\"GOOG\", 1980) == None" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    90
  echo "  get_first_price(\"GOOG\", 2010) == Some(311.349976)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    91
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    92
  if (scala_assert "drumb.scala" "drumb_test2.scala")
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    93
  then
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    94
      echo "  --> success" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    95
      marks=$(( marks + 1 ))
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    96
  else
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    97
      echo "  --> test failed" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    98
  fi
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
    99
fi
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
### get prices tests
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
if [ $tsts -eq 0 ]
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
then
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   105
  echo "  get_prices(List(\"BIDU\"), 2004 to 2008) ==" | tee -a $out
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   106
  echo "       List(List(None), List(None), List(Some(6.35)), " | tee -a $out
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   107
  echo "            List(Some(12.241)), List(Some(38.188)))" | tee -a $out
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   108
  echo " " | tee -a $out  
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   109
  echo "  get_prices(List(\"GOOG\", \"AAPL\"), 2010 to 2012) ==" | tee -a $out
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   110
  echo "       List(List(Some(311.349976), Some(20.544939))," | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   111
  echo "            List(Some(300.222351), Some(31.638695))," | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   112
  echo "            List(Some(330.555054), Some(39.478039)))" | tee -a $out
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   114
  if (scala_assert "drumb.scala" "drumb_test3.scala")
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
  then
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   116
      echo "  --> success" | tee -a $out
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   117
      marks=$(( marks + 1 ))
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
  else
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   119
      echo "  --> test failed" | tee -a $out
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
  fi
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
fi
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   123
### get_deltas_test
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   124
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   125
#if [ $tsts -eq 0 ]
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   126
#then
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   127
#  echo " val prices1 = get_prices(List(\"BIDU\"), 2004 to 2008)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   128
#  echo " val prices2 = get_prices(List(\"GOOG\", \"AAPL\"), 2010 to 2012)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   129
#  echo " " | tee -a $out  
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   130
#  echo " get_deltas(prices1) == List(List(None), List(None), " | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   131
#  echo "                             List(Some(0.9277165354330709)), " | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   132
#  echo "                             List(Some(2.119679764725104)))" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   133
#  echo " " | tee -a $out  
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   134
#  echo " get_deltas(prices2) == List(List(Some(-0.03573992567129673), Some(0.5399749442411563)), " | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   135
#  echo "                             List(Some(0.10103412653643493), Some(0.2477771728154912)))" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   136
#  
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   137
#  if (scala_assert "drumb.scala" "drumb_test2.scala") 
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   138
#  then
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   139
#      echo "  --> success" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   140
#      marks=$(( marks + 1 ))
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   141
#  else
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   142
#      echo "  --> test failed" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   143
#  fi
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   144
#fi
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   145
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
### yield_tests, investment_test
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   149
#if [ $tsts -eq 0 ]
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   150
#then
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   151
#  echo " val prices1 = get_prices(List(\"BIDU\"), 2004 to 2008)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   152
#  echo " val prices2 = get_prices(List(\"GOOG\", \"AAPL\"), 2010 to 2012)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   153
#  echo " val prices3 = get_prices(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2010 to 2012)" | tee -a $out 
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   154
#  echo " val deltas1 = get_deltas(prices1)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   155
#  echo " val deltas2 = get_deltas(prices2)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   156
#  echo " val deltas3 = get_deltas(prices3)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   157
#  echo "" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   158
#  echo " yearly_yield(deltas1, 100, 0) == 100" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   159
#  echo " yearly_yield(deltas1, 100, 2) == 192" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   160
#  echo " yearly_yield(deltas2, 100, 0) == 125" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   161
#  echo " yearly_yield(deltas3, 100, 0) == 164" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   162
#  echo " yearly_yield(deltas3, 100, 1) == 119" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   163
#  echo "" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   164
#  echo " val inv1 = investment(List(\"IBM\", \"BIDU\"), 2004 to 2008, 100)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   165
#  echo " val inv2 = investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2010 to 2012, 100)" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   166
#  echo "" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   167
#  echo " inv1 >= 295 && inv1 <= 301" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   168
#  echo " inv2 >= 194 && inv2 <= 198" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   169
#  
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   170
#  if (scala_assert "drumb.scala" "drumb_test3.scala") 
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   171
#  then
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   172
#      echo "  --> success" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   173
#      marks=$(( marks + 1 ))
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   174
#  else
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   175
#      echo "  --> test failed" | tee -a $out
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   176
#  fi
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   177
#fi
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   178
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   179
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   180
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   181
## final marks
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 169
diff changeset
   182
echo "Overall mark for CW 6, Part 1 + 2" | tee -a $out
169
b37052895281 updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
   183
echo "$marks" | tee -a $out