Mercurial > hg > vamp-build-and-test
comparison SCRIPTS/process.sh @ 45:6a072a24fed8
Test for some accompanying files
author | Chris Cannam |
---|---|
date | Thu, 07 Aug 2014 14:05:33 +0100 |
parents | 0036098a5edb |
children | d572322e2efe |
comparison
equal
deleted
inserted
replaced
44:0036098a5edb | 45:6a072a24fed8 |
---|---|
436 first=no | 436 first=no |
437 else | 437 else |
438 echo "NOTE: multiple .ttl or .n3 files found in $dir" | tee -a "$log" | 438 echo "NOTE: multiple .ttl or .n3 files found in $dir" | tee -a "$log" |
439 fi | 439 fi |
440 done | 440 done |
441 if [ "$first" = "yes" ]; then good=no; fi | 441 if [ "$first" = "yes" ]; then |
442 good=no; | |
443 else | |
444 echo "GOOD: found one or more .ttl or .n3 files (we don't actually test their validity or content here though)" | tee -a "$log" | |
445 fi | |
446 [ "$good" = "yes" ] | |
447 } | |
448 | |
449 env_test_accompaniments() { | |
450 dir="$1" | |
451 log=$(logfile_for envtest "$dir") | |
452 good=yes | |
453 if ! ls -1 "$dir" | egrep -qi "^readme(.txt|)$"; then | |
454 echo "ERROR: no README file found" | tee -a "$log" | |
455 good=no | |
456 fi | |
457 if ! ls -1 "$dir" | egrep -qi "^(copying|licen[cs]e)(.txt|)$"; then | |
458 echo "ERROR: no COPYING or LICEN[CS]E file found" | tee -a "$log" | |
459 good=no | |
460 fi | |
461 if ! ls -1 "$dir" | egrep -qi "^citation(.txt|)$"; then | |
462 echo "NOTE: no CITATION file found" | tee -a "$log" | |
463 fi | |
442 [ "$good" = "yes" ] | 464 [ "$good" = "yes" ] |
443 } | 465 } |
444 | 466 |
445 run_environmental_tests() { | 467 run_environmental_tests() { |
446 dir="$1" | 468 dir="$1" |
447 log=$(logfile_for envtest "$dir") | 469 log=$(logfile_for envtest "$dir") |
448 allgood=yes | 470 allgood=yes |
449 cat /dev/null > "$log" | 471 cat /dev/null > "$log" |
450 for test in exports stdout cat ttl; do | 472 for test in exports stdout cat ttl accompaniments; do |
451 "env_test_$test" "$dir" || allgood=no | 473 "env_test_$test" "$dir" || allgood=no |
452 done | 474 done |
453 if [ "$allgood" != "yes" ]; then | 475 if [ "$allgood" != "yes" ]; then |
454 echo "$dir" >> "$envcheckfailed" | 476 echo "$dir" >> "$envcheckfailed" |
455 return 1 | 477 return 1 |