summaryrefslogtreecommitdiff
path: root/tests/addcase.sh
blob: 7fbaaab1fa5ba09a9d61f2f81e1aa2b05c5265b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

if [ $# -ne 2 ]; then
  echo "Usage: addcase.sh <case-name> <case-ksfile>"
  exit 1
fi

CaseName=$1
CaseKs=$2

diff -upN ./mic_cases/base/test.ks ${CaseKs} > ks.p

cp ./mic_cases/base/test.conf conf_new
vi conf_new
diff -upN ./mic_cases/base/test.conf conf_new > conf.p
rm -f conf_new

cd ./mic_cases
mkdir test-${CaseName}
cd test-${CaseName}

mv ../../ks.p .
mv ../../conf.p .
vi options
vi expect

echo 'Ks diff:'
cat ks.p

echo 'Config diff:'
cat conf.p