source: mainline/uspace/dist/src/bithenge/test.sh@ 77578e8

Last change on this file since 77578e8 was 77578e8, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago

Whittle down more unlicensed files using my best guess as to the intended licensing

  • Property mode set to 100755
File size: 764 bytes
Line 
1#!/bin/bash
2#
3# SPDX-FileCopyrightText: 2022 HelenOS Project
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7shopt -s nullglob
8set -e
9
10BITHENGE=../../../app/bithenge/bithenge
11
12if type valgrind >/dev/null 2>&1
13then
14 BITHENGE="valgrind -q --show-reachable=yes --error-exitcode=64 ${BITHENGE}"
15else
16 echo "Valgrind not found."
17fi
18
19test_file() {
20 echo "Testing $1 on $2..."
21 ${BITHENGE} $1 $2 2>&1|diff $3 -
22}
23
24for BH in *.bh
25do
26 for DAT in $(basename ${BH} .bh).dat $(basename ${BH} .bh).*.dat
27 do
28 OUT=$(basename ${DAT} .dat).out
29 [ -e ${DAT} ] || continue
30 [ -e ${OUT} ] || continue
31 test_file ${BH} ${DAT} ${OUT}
32 done
33done
34
35test_file trip.bh file:trip.dat trip.out
36test_file repeat.bh hex:7f07020305070b0D11020004000800102040010101040009 repeat.out
37
38echo "Done!"
Note: See TracBrowser for help on using the repository browser.