diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-25 13:02:37 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-25 13:02:37 -0400 |
commit | ea7dd103404487d34f72cf37c09faf7a17bcd6ec (patch) | |
tree | 7bdaab4fb42cac7b3bd8157aeb890f15d26ec7d0 | |
parent | 7ae10ae3495cad70e8a4145986fa1295333fa00b (diff) | |
download | phoronix-test-suite-upstream-ea7dd103404487d34f72cf37c09faf7a17bcd6ec.tar.gz phoronix-test-suite-upstream-ea7dd103404487d34f72cf37c09faf7a17bcd6ec.tar.xz phoronix-test-suite-upstream-ea7dd103404487d34f72cf37c09faf7a17bcd6ec.zip |
More downloads.xml work and convert first profile to using downloads.xml
(build-imagemagick).
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | pts-core/functions/pts-functions-install.php | 5 | ||||
-rw-r--r-- | pts/benchmark-resources/build-imagemagick/downloads.xml | 9 | ||||
-rw-r--r-- | pts/benchmark-resources/build-imagemagick/install.sh | 5 | ||||
-rw-r--r-- | pts/etc/downloads-template.xml | 9 |
5 files changed, 22 insertions, 7 deletions
@@ -9,3 +9,4 @@ - More MD5 checks in test scripts - Change locking system away from time-based but to PID based - Clean up tests scripts +- To downloads.xml, try another mirror (if available) when MD5 sum fails or ask user if they want to quit or attempt to continue diff --git a/pts-core/functions/pts-functions-install.php b/pts-core/functions/pts-functions-install.php index 9701b10..4e56909 100644 --- a/pts-core/functions/pts-functions-install.php +++ b/pts-core/functions/pts-functions-install.php @@ -49,7 +49,7 @@ function pts_install_benchmark($Benchmark) if(pts_benchmark_type($Benchmark) != "BENCHMARK") return; - if(is_file(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") && (file_get_contents(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") == @md5_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.sh") || file_get_contents(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") == @md5_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.php"))) + if(is_file(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") && ((is_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.sh") && file_get_contents(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") == @md5_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.sh")) || (is_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.php") && file_get_contents(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") == @md5_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.php")))) { echo ucwords($Benchmark) . " is already installed, skipping installation routine...\n"; } @@ -72,8 +72,8 @@ function pts_install_benchmark($Benchmark) { $xml_parser = new tandem_XmlReader(file_get_contents(BENCHMARK_RESOURCE_DIR . $Benchmark . "/downloads.xml")); $package_url = $xml_parser->getXMLArrayValues("PhoronixTestSuite/Downloads/Package/URL"); - $package_filename = $xml_parser->getXMLArrayValues("PhoronixTestSuite/Downloads/Package/FileName"); $package_md5 = $xml_parser->getXMLArrayValues("PhoronixTestSuite/Downloads/Package/MD5"); + $package_filename = $xml_parser->getXMLArrayValues("PhoronixTestSuite/Downloads/Package/FileName"); for($i = 0; $i < count($package_url); $i++) { @@ -93,6 +93,7 @@ function pts_install_benchmark($Benchmark) if(is_file(BENCHMARK_ENV_DIR . $Benchmark . "/" . $package_filename[$i]) && !empty($package_md5[$i]) && md5_file(BENCHMARK_ENV_DIR . $Benchmark . "/" . $package_filename[$i]) != $package_md5[$i]) { + echo "\nMD5 sums don't match! Removing File!\n"; unlink(BENCHMARK_ENV_DIR . $Benchmark . "/" . $package_filename[$i]); } } diff --git a/pts/benchmark-resources/build-imagemagick/downloads.xml b/pts/benchmark-resources/build-imagemagick/downloads.xml new file mode 100644 index 0000000..552f009 --- /dev/null +++ b/pts/benchmark-resources/build-imagemagick/downloads.xml @@ -0,0 +1,9 @@ +<PhoronixTestSuite> + <Downloads> + <Package> + <URL>ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.4.0-7.tar.bz2</URL> + <MD5>a36b9076c0d4f880daca10c7ab3f5208</MD5> + <FileName>image-magick.tar.bz2</FileName> + </Package> + </Downloads> +</PhoronixTestSuite> diff --git a/pts/benchmark-resources/build-imagemagick/install.sh b/pts/benchmark-resources/build-imagemagick/install.sh index bd99bea..7a36e1f 100644 --- a/pts/benchmark-resources/build-imagemagick/install.sh +++ b/pts/benchmark-resources/build-imagemagick/install.sh @@ -2,11 +2,6 @@ cd $1 -if [ ! -f image-magick.tar.bz2 ] - then - wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.4.0-7.tar.bz2 -O image-magick.tar.bz2 -fi - echo "#!/bin/sh if [ ! -f image-magick.tar.bz2 ] diff --git a/pts/etc/downloads-template.xml b/pts/etc/downloads-template.xml new file mode 100644 index 0000000..9aa21e4 --- /dev/null +++ b/pts/etc/downloads-template.xml @@ -0,0 +1,9 @@ +<PhoronixTestSuite> + <Downloads> + <Package> + <URL></URL> + <MD5></MD5> + <FileName></FileName> + </Package> + </Downloads> +</PhoronixTestSuite> |