source: icGREP/icgrep-devel/QA/u8u16/run_all @ 5584

Last change on this file since 5584 was 5306, checked in by cameron, 3 years ago

Modify u8u16 to use FileSink? for output

  • Property svn:executable set to *
File size: 799 bytes
Line 
1#!/bin/bash
2#
3# Robert D. Cameron
4#
5# Usage: ./run_all test_program
6# Example ./run_all ../u8u16
7#
8test_dir=`echo "$0" | sed "s/[^\/]*$//"`
9
10test_program=$1
11input_directory=TestFiles
12output_directory=TestOutput
13
14
15[ -x "$output_directory.bak" ] && rm -rf $output_directory.bak
16[ -x "$output_directory" ] && mv $output_directory $output_directory.bak
17
18mkdir $output_directory
19mkdir $output_directory/Files
20mkdir $output_directory/Messages
21
22for f in $input_directory/*
23do
24   fbase=`echo $f | sed "s/$input_directory\///"`
25   $test_program $input_directory/$fbase $output_directory/Files/$fbase 2>$output_directory/Messages/$fbase
26done
27
28if diff -q --exclude='.svn' ExpectedOutput/Files TestOutput/Files
29  then
30    diff --exclude='.svn' ExpectedOutput/Messages TestOutput/Messages
31  else
32    exit 2
33fi
34
Note: See TracBrowser for help on using the repository browser.