source: proto/u16u8/QA/run_all @ 357

Last change on this file since 357 was 357, checked in by cameron, 9 years ago

Initialize u16u8 project with QA framework.

  • Property svn:executable set to *
File size: 842 bytes
Line 
1#!/bin/bash
2#
3# Robert D. Cameron
4#
5# Usage: ./run_all test_program
6# Example ./run_all ../u8u16_mmx
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
28echo "diff -q ExpectedOutput/Files TestOutput/Files"
29diff -q ExpectedOutput/Files TestOutput/Files
30echo "diff ExpectedOutput/Messages TestOutput/Messages"
31diff ExpectedOutput/Messages TestOutput/Messages
Note: See TracBrowser for help on using the repository browser.