test/script/basic/runsunspider.js

Print this page




 104         }
 105 
 106     } catch (e) {
 107         print("error: " + e);
 108         if (e.toString().indexOf(args) == 1) {
 109             throw e;
 110         }
 111         // no scripting or something, silently fail
 112     }
 113     return changed;
 114 }
 115 
 116 var args;
 117 if (typeof $ARGS !== 'undefined') {
 118     args = $ARGS;
 119 } else if (typeof arguments !== 'undefined') {
 120     args = arguments;
 121 } 
 122 
 123 var tests = [
 124              'check-3d-cube.js',
 125              'check-access-nsieve.js',
 126              'check-crypto-aes.js',   
 127              'check-math-spectral-norm.js',
 128              'check-3d-morph.js',
 129              'check-bitops-3bit-bits-in-byte.js',
 130              'check-crypto-md5.js',
 131              'check-mont.js',
 132              'check-3d-raytrace.js',
 133              'check-bitops-bits-in-byte.js',
 134              'check-crypto-sha1.js',
 135              'check-regexp-dna.js',
 136              'check-access-binary-trees.js',
 137              'check-bitops-bitwise-and.js',
 138              'check-date-format-tofte.js',
 139              'check-string-fasta.js',
 140              'check-access-fannkuch.js',
 141              'check-bitops-nsieve-bits.js',
 142              'check-math-cordic.js',
 143              'check-string-tagcloud.js',
 144              'check-access-nbody.js',
 145              'check-controlflow-recursive.js',
 146              'check-math-partial-sums.js',
 147              'check-string-unpack-code.js'
 148              ];
 149 
 150 // handle the case this script may be run by a JS engine that doesn't
 151 // support __DIR__ global variable.
 152 var dir = (typeof(__DIR__) == 'undefined')? "test/script/basic/" : __DIR__;
 153 
 154 for (i in tests) {
 155     tests[i] = dir + '../external/sunspider/' + tests[i];
 156 }
 157 
 158 var verbose_run = false;
 159 
 160 // check for a fileset from ant and split it - special case call from ant build.xml
 161 if (args.length == 1 && args[0].toString().indexOf(' ') != -1) {
 162     args[0] = args[0].replace(/\/$/, '');
 163     args = args[0].split(' ');
 164     verbose_run = true; //for a file set, always run verbose for ant sunspider output
 165 } 
 166 
 167 
 168 var tests_found = [];
 169 
 170 for (i in args) {
 171     var arg = args[i];
 172     if (arg.indexOf('--') == 0) {
 173         if (arg == '--verbose') {
 174             verbose_run = true;
 175         } 


 104         }
 105 
 106     } catch (e) {
 107         print("error: " + e);
 108         if (e.toString().indexOf(args) == 1) {
 109             throw e;
 110         }
 111         // no scripting or something, silently fail
 112     }
 113     return changed;
 114 }
 115 
 116 var args;
 117 if (typeof $ARGS !== 'undefined') {
 118     args = $ARGS;
 119 } else if (typeof arguments !== 'undefined') {
 120     args = arguments;
 121 } 
 122 
 123 var tests = [
 124              '3d-cube.js',
 125              'access-nsieve.js',
 126              'crypto-aes.js',   
 127              'math-spectral-norm.js',
 128              '3d-morph.js',
 129              'bitops-3bit-bits-in-byte.js',
 130              'crypto-md5.js',
 131              '3d-raytrace.js',
 132              'bitops-bits-in-byte.js',
 133              'crypto-sha1.js',
 134              'regexp-dna.js',
 135              'access-binary-trees.js',
 136              'bitops-bitwise-and.js',
 137              'date-format-tofte.js',
 138              'string-fasta.js',
 139              'access-fannkuch.js',
 140              'bitops-nsieve-bits.js',
 141              'math-cordic.js',
 142              'string-tagcloud.js',
 143              'access-nbody.js',
 144              'controlflow-recursive.js',
 145              'math-partial-sums.js',
 146              'string-unpack-code.js'

 147              ];
 148 
 149 // handle the case this script may be run by a JS engine that doesn't
 150 // support __DIR__ global variable.
 151 var dir = (typeof(__DIR__) == 'undefined')? "test/script/basic/" : __DIR__;
 152 
 153 for (i in tests) {
 154     tests[i] = dir + '../external/sunspider/tests/sunspider-1.0/' + tests[i];
 155 }
 156 
 157 var verbose_run = false;
 158 
 159 // check for a fileset from ant and split it - special case call from ant build.xml
 160 if (args.length == 1 && args[0].toString().indexOf(' ') != -1) {
 161     args[0] = args[0].replace(/\/$/, '');
 162     args = args[0].split(' ');
 163     verbose_run = true; //for a file set, always run verbose for ant sunspider output
 164 } 
 165 
 166 
 167 var tests_found = [];
 168 
 169 for (i in args) {
 170     var arg = args[i];
 171     if (arg.indexOf('--') == 0) {
 172         if (arg == '--verbose') {
 173             verbose_run = true;
 174         }