création d'un test en bash

git-svn-id: http://cregut.svn.enseeiht.fr/2020/1sn/pim/projets/GH-05@210315 e13453a9-b01f-0410-a051-f404c4f0c485
This commit is contained in:
lfainsin 2020-12-22 13:27:03 +00:00
parent 0cc449919d
commit 2123e2bf5d

52
test_pagerank.bash Normal file
View file

@ -0,0 +1,52 @@
#!/bin/bash
ulimit -s 1000000
make clean
echo
colormake
echo
echo "$(tput setaf 2)command: build/pagerank -P fichiers_test/Exemple_sujet/exemple_sujet.net$(tput setaf 7)"
build/pagerank -P fichiers_test/Exemple_sujet/exemple_sujet.net
echo
cmp --silent \
fichiers_test/Exemple_sujet/exemple_sujet_GH05.ord \
fichiers_test/Exemple_sujet/exemple_sujet.ord \
|| echo "$(tput setaf 1)exemple_sujet .ord files are different$(tput setaf 7)"
cmp --silent \
fichiers_test/Exemple_sujet/exemple_sujet_GH05.p \
fichiers_test/Exemple_sujet/exemple_sujet_P_6.p \
|| echo "$(tput setaf 1)exemple_sujet .p files are different$(tput setaf 7)"
echo
echo "$(tput setaf 2)command: build/pagerank -P fichiers_test/Worm/worm.net$(tput setaf 7)"
build/pagerank -P fichiers_test/Worm/worm.net
echo
cmp --silent \
fichiers_test/Worm/worm_GH05.ord \
fichiers_test/Worm/worm.ord \
|| echo "$(tput setaf 1)worm .ord files are different$(tput setaf 7)"
cmp --silent \
fichiers_test/Worm/worm_GH05.p \
fichiers_test/Worm/worm_P_6.p \
|| echo "$(tput setaf 1)worm .p files are different$(tput setaf 7)"
echo
echo "$(tput setaf 2)command: build/pagerank -P fichiers_test/Brainlinks/brainlinks.net$(tput setaf 7)"
build/pagerank -P fichiers_test/Brainlinks/brainlinks.net
echo
cmp --silent \
fichiers_test/Brainlinks/brainlinks_GH05.ord \
fichiers_test/Brainlinks/brainlinks.ord \
|| echo "$(tput setaf 1)brainlinks .ord files are different$(tput setaf 7)"
cmp --silent \
fichiers_test/Brainlinks/brainlinks_GH05.p \
fichiers_test/Brainlinks/brainlinks_P_6.p \
|| echo "$(tput setaf 1)brainlinks .p files are different$(tput setaf 7)"
echo
#build/pagerank fichiers_test/Exemple_sujet/exemple_sujet.net
#build/pagerank fichiers_test/Worm/worm.net
#build/pagerank fichiers_test/Brainlinks/brainlinks.net
#build/pagerank fichiers_test/Linux26/Linux26.net