Skip to content

Commit 132dfd9

Browse files
clanmillsD4N
authored andcommitted
[tests] Use env instead of hardcoding the path to bash
This fixes Exiv2#958 (cherry picked from commit c12f91f)
1 parent 8805423 commit 132dfd9

28 files changed

+33
-33
lines changed

test/addmoddel.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver to run the addmoddel sample program
33
source ./functions.source
44

test/bugfixes-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver with regression tests for bugfixes
33

44
source ./functions.source

test/conversions.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# XMP parser test driver
33

44
# ----------------------------------------------------------------------
@@ -207,11 +207,11 @@ fi
207207
platform=$(runTest exiv2 -vV 2>/dev/null | grep platform=)
208208
if [ "$platform" == "platform=windows" ]; then
209209
runTest exiv2 -PEkycv v.jpg | sed -E -e 's#17 19:10:22#18 02:10:22#g'
210-
else
210+
else
211211
runTest exiv2 -PEkycv v.jpg
212212
fi
213213
runTest exiv2 -pi v.jpg
214-
214+
215215
# 16) https://github.com/Exiv2/exiv2/issues/521
216216
echo
217217
echo Testcase 16

test/crw-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/sh
1+
#!/usr/bin/env bash
22
# Test driver for CRW file operations
33

44
source ./functions.source

test/curliotest.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for CurlIO
33

44
source ./functions.source
@@ -76,7 +76,7 @@ RemoteIOTest()
7676
if [[ "$USE_CURL" == *http* ]]; then
7777
# test connection
7878
printf 'http test connection '
79-
TEST_CON=$("$bin"/conntest http://$EXIV2_AWSUBUNTU_HOST/$testfile)
79+
TEST_CON=$("$bin"/conntest http://$EXIV2_AWSUBUNTU_HOST/$testfile)
8080
if [[ "$TEST_CON" == OK* ]]; then
8181
errors=0
8282
printf 'OK\nHTTP IO '

test/exifdata-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for exifdata copy construction and assignment unit tests
33
source ./functions.source
44

test/exiv2-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for exiv2 utility tests
33

44
source ./functions.source

test/geotag-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for geotag
33

44
source ./functions.source

test/http-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for http/https
33

44
source ./functions.source

test/httpiotest.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for httptest and httpIo
33

44
source ./functions.source
@@ -36,12 +36,12 @@ httpIoTest()
3636
testfile="conntest.jpg"
3737
iopngfiles+=(remoteio{1..5}.png)
3838
iojpgfiles+=(remoteio{6..10}.jpg)
39-
39+
4040
# test connection (basic sanity test)
4141
printf 'http test connection '
4242
TEST_CON=$("$bin"/conntest http://$EXIV2_AWSUBUNTU_HOST/$testfile)
4343
if [[ "$TEST_CON" == OK* ]]; then
44-
#Tests for httpIo
44+
#Tests for httpIo
4545
printf 'OK\nHTTP IO '
4646
for name in ${iopngfiles[@]}; do
4747
httpIoTest "http://$EXIV2_AWSUBUNTU_HOST/$name"

test/icc-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for exiv2.exe ICC support (-pS, -pC, -eC, -iC)
33

44
source ./functions.source

test/imagetest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for image file i/o
33

44
# **********************************************************************

test/iotest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for image file i/o
33

44
source ./functions.source

test/iptctest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for Iptc metadata
33

44
source ./functions.source

test/iso65k-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# test for ISOs which follow Annex G of EXIF 2.3 spec, i.e. ISOs,
33
# which cannot be represented by Exif.Photo.ISOSpeedRatings due to
44
# being larger than 65k

test/modify-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for write unit tests to build Exif metadata from scratch
33
source ./functions.source
44

test/path-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Mini test-driver for path utility functions
33
source ./functions.source
44

test/preview-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for previews
33

44
source ./functions.source

test/stdin-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for stdin
33

44
source ./functions.source

test/stringto-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for tests of stringToLong/Float/Rational
33
source ./functions.source
44

test/testMSVC.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
msvc=$1
44
test=$2

test/version-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for exiv2.exe --verbose --version
33

44
source ./functions.source

test/video-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for video files
33
#
44
# video-asf.wmv http://www.educationalquestions.com/video/DLP_PART_2_768k.wmv

test/webp-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for webp
33

44
source ./functions.source

test/write-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for the write unit tests
33

44
source ./functions.source

test/write-video-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for write video
33

44
source ./functions.source

test/write2-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Test driver for write unit tests to build Exif metadata from scratch
33

44
source ./functions.source

test/xmpparser-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# XMP parser test driver
33

44
source ./functions.source

0 commit comments

Comments
 (0)