source: icGREP/icgrep-devel/QA/run_abc @ 5826

Last change on this file since 5826 was 5382, checked in by nmedfort, 2 years ago

Updated QA tests. run_abc now tests stdin. Both RunSystemTests? and RunPairwiseTests? execute all tests on files rather than testing only compilation success.

  • Property svn:executable set to *
File size: 650 bytes
Line 
1#!/bin/bash
2#
3# Robert D. Cameron
4#
5# Usage: ./run_abc test_program
6# Example ./run_abc ../icgrep-build/icgrep
7#
8test_dir=`echo "$0" | sed "s/[^\/]*$//"`
9
10test_program=$1
11input_directory=abc/TestFiles
12output_directory=abc/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
19
20for f in $input_directory/*
21do
22   fbase=`echo $f | sed "s#$input_directory/##"`
23   $test_program 'ab*c' < $input_directory/$fbase >$output_directory/$fbase
24done
25
26echo "diff -q abc/ExpectedOutput abc/TestOutput"
27diff -q abc/ExpectedOutput abc/TestOutput
Note: See TracBrowser for help on using the repository browser.