[llvm-commits] [test-suite] r105423 - in /test-suite/trunk/MultiSource/Benchmarks/PAQ8p: paq8p.cpp paq8p.reference_output paq8p.reference_output.small
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Jun 3 15:22:23 PDT 2010
Author: stoklund
Date: Thu Jun 3 17:22:23 2010
New Revision: 105423
URL: http://llvm.org/viewvc/llvm-project?rev=105423&view=rev
Log:
Remove path names from output.
Modified:
test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp
test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output
test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small
Modified: test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp?rev=105423&r1=105422&r2=105423&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp (original)
+++ test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp Thu Jun 3 17:22:23 2010
@@ -636,6 +636,11 @@
inline int max(int a, int b) {return a<b?b:a;}
#endif
+static const char *mybasename(const char *str) {
+ const char *base = strrchr(str, '/');
+ return base ? base+1 : str;
+}
+
// Error handler: print message if any, and exit
void quit(const char* message=0) {
throw message;
@@ -3970,7 +3975,7 @@
FILE *f=fopen(filename, "rb");
if (!f) perror(filename), quit();
long start=en.size();
- printf("%s %ld -> ", filename, filesize);
+ printf("%s %ld -> ", mybasename(filename), filesize);
// Transform and test in blocks
const int BLOCK=MEM*64;
@@ -4044,7 +4049,7 @@
// Test if output file exists. If so, then compare.
FILE* f=fopen(filename, "rb");
if (f) {
- printf("Comparing %s %ld -> ", filename, filesize);
+ printf("Comparing %s %ld -> ", mybasename(filename), filesize);
bool found=false; // mismatch?
for (int i=0; i<filesize; ++i) {
printStatus(i);
@@ -4081,7 +4086,7 @@
// Decompress
if (f) {
- printf("Extracting %s %ld -> ", filename, filesize);
+ printf("Extracting %s %ld -> ", mybasename(filename), filesize);
for (int i=0; i<filesize; ++i) {
printStatus(i);
putc(decode(en), f);
@@ -4093,7 +4098,7 @@
// Can't create, discard data
else {
perror(filename);
- printf("Skipping %s %ld -> ", filename, filesize);
+ printf("Skipping %s %ld -> ", mybasename(filename), filesize);
for (int i=0; i<filesize; ++i) {
printStatus(i);
decode(en);
@@ -4337,7 +4342,7 @@
fprintf(archive, PROGNAME " -%d\r\n%s\x1A",
level, header_string.c_str());
printf("Creating archive %s with %d file(s)...\n",
- archiveName.c_str(), files);
+ mybasename(archiveName.c_str()), files);
// Fill fname[files], fsize[files] with input filenames and sizes
fname.resize(files);
@@ -4373,7 +4378,7 @@
// Fill fname[files], fsize[files] with output file names and sizes
while (getline(archive)) ++files; // count files
printf("Extracting %d file(s) from %s -%d\n", files,
- archiveName.c_str(), level);
+ mybasename(archiveName.c_str()), level);
long header_size=ftell(archive);
filenames.resize(header_size+4); // copy of header
rewind(archive);
Modified: test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output?rev=105423&r1=105422&r2=105423&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output (original)
+++ test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output Thu Jun 3 17:22:23 2010
@@ -2,5 +2,5 @@
file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840 1679
36 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048 262144262371
262144 -> 262400
Extracting 1 file(s) from file1.in.paq8p -4
-Comparing ./file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840
167936 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048identical
+Comparing file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840
167936 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048identical
exit 0
Modified: test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small?rev=105423&r1=105422&r2=105423&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small (original)
+++ test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small Thu Jun 3 17:22:23 2010
@@ -2,5 +2,5 @@
file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840 1679
36 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048 262144262360
262144 -> 262389
Extracting 1 file(s) from file1.in.paq8p -1
-Comparing ./file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840
167936 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048identical
+Comparing file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840
167936 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048identical
exit 0
More information about the llvm-commits
mailing list