Adding main push test and homogenizing test running
This commit is contained in:
parent
1fd97035e8
commit
11800635cd
|
@ -3,6 +3,8 @@ name: Build and Run Tests
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Getting executable paths
|
# Getting executable paths
|
||||||
quickerNESExecutable=${1}
|
baseExecutable=${1}
|
||||||
quickNESExecutable=${2}
|
newExecutable=${2}
|
||||||
|
|
||||||
# Getting script name
|
# Getting script name
|
||||||
script=${3}
|
script=${3}
|
||||||
|
@ -24,32 +24,32 @@ folder=`basename $PWD`
|
||||||
pid=$$
|
pid=$$
|
||||||
|
|
||||||
# Hash files
|
# Hash files
|
||||||
quickerNESHashFile="/tmp/quickerNES.${folder}.${script}.${mode}.${pid}.hash"
|
baseHashFile="/tmp/quickerNES.${folder}.${script}.${mode}.${pid}.hash"
|
||||||
quickNESHashFile="/tmp/quickNES.${folder}.${script}.${mode}.${pid}.hash"
|
newHashFile="/tmp/quickNES.${folder}.${script}.${mode}.${pid}.hash"
|
||||||
|
|
||||||
# Removing them if already present
|
# Removing them if already present
|
||||||
rm -f ${quickerNESHashFile}
|
rm -f ${baseHashFile}
|
||||||
rm -f ${quickNESHashFile}
|
rm -f ${newHashFile}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
# Running script on quickerNES
|
# Running script on quickerNES
|
||||||
${quickerNESExecutable} ${script} --hashOutputFile ${quickerNESHashFile} ${testerArgs}
|
${baseExecutable} ${script} --hashOutputFile ${baseHashFile} ${testerArgs}
|
||||||
|
|
||||||
# Running script on quickNES
|
# Running script on quickNES
|
||||||
${quickNESExecutable} ${script} --hashOutputFile ${quickNESHashFile} ${testerArgs}
|
${newExecutable} ${script} --hashOutputFile ${newHashFile} ${testerArgs}
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
# Comparing hashes
|
# Comparing hashes
|
||||||
quickerNESHash=`cat ${quickerNESHashFile}`
|
baseHash=`cat ${baseHashFile}`
|
||||||
|
|
||||||
# Comparing hashes
|
# Comparing hashes
|
||||||
quickNESHash=`cat ${quickNESHashFile}`
|
newHash=`cat ${newHashFile}`
|
||||||
|
|
||||||
# Removing temporary files
|
# Removing temporary files
|
||||||
rm -f ${quickerNESHashFile} ${quickNESHashFile}
|
rm -f ${baseHashFile} ${newHashFile}
|
||||||
|
|
||||||
# Compare hashes
|
# Compare hashes
|
||||||
if [ "${quickerNESHash}" = "${quickNESHash}" ]; then
|
if [ "${baseHash}" = "${newHash}" ]; then
|
||||||
echo "[] Test Passed"
|
echo "[] Test Passed"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue