1@echo off 2@rem runtests.bat - run CHICKEN testsuite on cmd.exe with mingw 3 4setlocal enableextensions 5 6set TEST_DIR=%cd% 7 8set CHICKEN=..\%PROGRAM_PREFIX%chicken%PROGRAM_SUFFIX% 9set CHICKEN_PROFILE=..\%PROGRAM_PREFIX%chicken-profile%PROGRAM_SUFFIX% 10set CHICKEN_INSTALL_REPOSITORY=%TEST_DIR%\test-repository 11set CHICKEN_REPOSITORY_PATH=%TEST_DIR%\..;%CHICKEN_INSTALL_REPOSITORY% 12set PATH=%TEST_DIR%\..;%PATH% 13 14rem Increase this when tests start failing on "inexplicable" diffs 15set FCBUFSIZE=500 16 17set TYPESDB=..\types.db 18set COMPILE_OPTIONS=-v -compiler %CHICKEN% -I%TEST_DIR%/.. -L%TEST_DIR%/.. -include-path %TEST_DIR%/.. -libdir %TEST_DIR%/.. 19 20set compile=..\%PROGRAM_PREFIX%csc%PROGRAM_SUFFIX% %COMPILE_OPTIONS% -o a.out -types %TYPESDB% -ignore-repository 21set compile_r=..\%PROGRAM_PREFIX%csc%PROGRAM_SUFFIX% %COMPILE_OPTIONS% 22set compile_s=..\%PROGRAM_PREFIX%csc%PROGRAM_SUFFIX% %COMPILE_OPTIONS% -s -types %TYPESDB% -ignore-repository 23set interpret=..\%PROGRAM_PREFIX%csi%PROGRAM_SUFFIX% -n -include-path %TEST_DIR%/.. 24 25del /f /q /s *.exe *.so *.o *.obj *.out *.import.* ..\foo.import.* %CHICKEN_INSTALL_REPOSITORY% 26rmdir /q /s %CHICKEN_INSTALL_REPOSITORY% 27mkdir %CHICKEN_INSTALL_REPOSITORY% 28copy %TYPESDB% %CHICKEN_INSTALL_REPOSITORY% 29 30echo ======================================== repository search path ... 31setlocal 32set "CHICKEN_REPOSITORY_PATH=" 33%interpret% -s repository-path-default.scm 34if errorlevel 1 exit /b 1 35endlocal 36%compile_s% sample-module.scm -j sample-module 37if errorlevel 1 exit /b 1 38copy sample-module.so %CHICKEN_INSTALL_REPOSITORY% 39copy sample-module.import.scm %CHICKEN_INSTALL_REPOSITORY% 40%interpret% -s repository-path.scm "%TEST_DIR%\.." "%TEST_DIR%\test-repository" 41if errorlevel 1 exit /b 1 42 43echo ======================================== types.db consistency ... 44%interpret% -s types-db-consistency.scm %TYPESDB% 45if errorlevel 1 exit /b 1 46 47echo ======================================== version tests ... 48%compile% version-tests.scm 49if errorlevel 1 exit /b 1 50a.out 51if errorlevel 1 exit /b 1 52 53echo ======================================== compiler tests ... 54%compile% compiler-tests.scm 55if errorlevel 1 exit /b 1 56a.out 57if errorlevel 1 exit /b 1 58 59echo "======================================== csc tests ..." 60%interpret% -s csc-tests.scm 61if errorlevel 1 exit /b 1 62 63echo ======================================== compiler inlining tests ... 64%compile_r% inline-me.scm -s -J -oi inline-me.inline 65if errorlevel 1 exit /b 1 66%compile% inlining-tests.scm -optimize-level 3 67if errorlevel 1 exit /b 1 68a.out 69if errorlevel 1 exit /b 1 70%compile% inline-unroll.scm -optimize-level 3 71if errorlevel 1 exit /b 1 72a.out 73if errorlevel 1 exit /b 1 74 75echo ======================================== compiler message tests ... 76%compile% -analyze-only messages-test.scm 2>messages.out 77if errorlevel 1 exit /b 1 78fc /lb%FCBUFSIZE% /w messages.expected messages.out 79if errorlevel 1 exit /b 1 80 81echo ======================================== optimizer tests ... 82%compile% clustering-tests.scm -clustering 83if errorlevel 1 exit /b 1 84a.out 85if errorlevel 1 exit /b 1 86 87%compile% rest-arg-tests.scm -specialize 88if errorlevel 1 exit /b 1 89a.out 90if errorlevel 1 exit /b 1 91 92echo ======================================== profiler tests ... 93%compile% null.scm -profile -profile-name TEST.profile 94if errorlevel 1 exit /b 1 95a.out 96if errorlevel 1 exit /b 1 97%CHICKEN_PROFILE% TEST.profile 98if errorlevel 1 exit /b 1 99 100echo ======================================== scrutiny tests ... 101%compile% scrutinizer-tests.scm -analyze-only 102%compile% typematch-tests.scm -specialize -w 103if errorlevel 1 exit /b 1 104a.out 105if errorlevel 1 exit /b 1 106 107%compile% test-scrutinizer-message-format.scm -analyze-only -specialize 2>scrutinizer-message-format.out 108rem this is expected to fail, so no errorlevel check 109%compile% scrutiny-tests.scm -analyze-only -specialize 2>scrutiny.out 110if errorlevel 1 exit /b 1 111%compile% scrutiny-tests-2.scm -analyze-only -specialize 2>scrutiny-2.out 112if errorlevel 1 exit /b 1 113%compile% specialization-tests.scm -analyze-only -specialize 2>specialization.out 114if errorlevel 1 exit /b 1 115 116rem Replace foo123 -> fooXX so gensyms don't trigger failures 117%compile% redact-gensyms.scm -o redact-gensyms 118if errorlevel 1 exit /b 1 119redact-gensyms "tmp,g,scm:,a,b" < scrutinizer-message-format.out > scrutinizer-message-format.redacted 120if errorlevel 1 exit /b 1 121redact-gensyms < scrutiny-2.out > scrutiny-2.redacted 122if errorlevel 1 exit /b 1 123redact-gensyms < scrutiny.out > scrutiny.redacted 124if errorlevel 1 exit /b 1 125redact-gensyms < specialization.out > specialization.redacted 126if errorlevel 1 exit /b 1 127 128fc /lb%FCBUFSIZE% /w scrutinizer-message-format.expected scrutinizer-message-format.redacted 129if errorlevel 1 exit /b 1 130fc /lb%FCBUFSIZE% /w scrutiny.expected scrutiny.redacted 131if errorlevel 1 exit /b 1 132fc /lb%FCBUFSIZE% /w scrutiny-2.expected scrutiny-2.redacted 133if errorlevel 1 exit /b 1 134fc /lb%FCBUFSIZE% /w specialization.expected specialization.redacted 135if errorlevel 1 exit /b 1 136 137%compile% scrutiny-tests-3.scm -specialize -block 138if errorlevel 1 exit /b 1 139a.out 140if errorlevel 1 exit /b 1 141 142%compile% scrutiny-tests-strict.scm -strict-types -specialize 143if errorlevel 1 exit /b 1 144a.out 145if errorlevel 1 exit /b 1 146 147echo ======================================== line number database ... 148%compile% -O3 test-line-numbers.scm 2>test-line-numbers.out 149if errorlevel 1 exit /b 1 150fc /lb%FCBUFSIZE% /w test-line-numbers.expected test-line-numbers.out 151if errorlevel 1 exit /b 1 152a.out 153if errorlevel 1 exit /b 1 154 155echo ======================================== specialization tests ... 156del /f /q foo.types foo.import.* 157%compile% specialization-test-1.scm -emit-types-file foo.types -specialize -debug ox -emit-import-library foo 158if errorlevel 1 exit /b 1 159a.out 160if errorlevel 1 exit /b 1 161%compile% specialization-test-2.scm -types foo.types -types specialization-test-2.types -specialize -debug ox 162if errorlevel 1 exit /b 1 163a.out 164if errorlevel 1 exit /b 1 165del /f /q foo.types foo.import.* 166 167echo ======================================== specialization benchmark ... 168%compile% fft.scm -O2 -local -d0 -disable-interrupts -b -o fft1.out 169if errorlevel 1 exit /b 1 170%compile% fft.scm -O2 -local -specialize -debug x -d0 -disable-interrupts -b -o fft2.out -specialize 171if errorlevel 1 exit /b 1 172echo normal: 173fft1.out 1000 7 174if errorlevel 1 exit /b 1 175echo specialized: 176fft2.out 1000 7 177if errorlevel 1 exit /b 1 178 179echo ======================================== unboxing benchmark ... 180%compile% fft.scm -O2 -local -d0 -disable-interrupts -b -o fft1.out 181if errorlevel 1 exit /b 1 182%compile% fft.scm -O4 -debug x -d0 -disable-interrupts -b -o fft2.out 183if errorlevel 1 exit /b 1 184echo normal: 185fft1.out 1000 7 186if errorlevel 1 exit /b 1 187echo unboxing: 188fft2.out 1000 7 189if errorlevel 1 exit /b 1 190 191echo ======================================== callback tests ... 192%compile% -extend c-id-valid.scm callback-tests.scm 193if errorlevel 1 exit /b 1 194a.out 195if errorlevel 1 exit /b 1 196a.out twice 197 198if errorlevel 1 ( 199 echo double-return from callback failed as it should. 200) else ( 201 echo double-return from callback didn't fail 202 exit /b 1 203) 204 205echo ======================================== runtime tests ... 206%interpret% -s apply-test.scm 207if errorlevel 1 exit /b 1 208%compile% apply-test.scm 209if errorlevel 1 exit /b 1 210a.out 211if errorlevel 1 exit /b 1 212a.out -:A10k 213 214if errorlevel 1 ( 215 echo apply test with limited temp stack failed as it should. 216) else ( 217 echo apply test with limited temp stack didn't fail 218 exit /b 1 219) 220 221%compile% test-gc-hooks.scm 222if errorlevel 1 exit /b 1 223a.out 224if errorlevel 1 exit /b 1 225 226echo ======================================== library tests ... 227%interpret% -s library-tests.scm 228if errorlevel 1 exit /b 1 229%compile% -specialize library-tests.scm 230if errorlevel 1 exit /b 1 231a.out 232if errorlevel 1 exit /b 1 233%interpret% -s records-and-setters-test.scm 234if errorlevel 1 exit /b 1 235%compile% records-and-setters-test.scm 236if errorlevel 1 exit /b 1 237a.out 238if errorlevel 1 exit /b 1 239%interpret% -s record-printer-test.scm 240if errorlevel 1 exit /b 1 241%compile% record-printer-test.scm 242if errorlevel 1 exit /b 1 243a.out 244if errorlevel 1 exit /b 1 245 246echo ======================================== reader tests ... 247%interpret% -s reader-tests.scm 248if errorlevel 1 exit /b 1 249 250echo ======================================== dynamic-wind tests ... 251%interpret% -s dwindtst.scm >dwindtst.out 252if errorlevel 1 exit /b 1 253fc /lb%FCBUFSIZE% /w dwindtst.expected dwindtst.out 254if errorlevel 1 exit /b 1 255%compile% dwindtst.scm 256if errorlevel 1 exit /b 1 257a.out >dwindtst.out 258if errorlevel 1 exit /b 1 259fc /lb%FCBUFSIZE% /w dwindtst.expected dwindtst.out 260if errorlevel 1 exit /b 1 261 262echo ======================================== lolevel tests ... 263%interpret% -s lolevel-tests.scm 264if errorlevel 1 exit /b 1 265%compile% lolevel-tests.scm 266if errorlevel 1 exit /b 1 267a.out 268if errorlevel 1 exit /b 1 269 270echo ======================================== arithmetic tests ... 271%interpret% -D check -s arithmetic-test.scm 272if errorlevel 1 exit /b 1 273 274echo ======================================== pretty-printer tests ... 275%interpret% -s pp-test.scm 276if errorlevel 1 exit /b 1 277 278echo ======================================== evaluation environment tests ... 279%interpret% -s environment-tests.scm 280if errorlevel 1 exit /b 1 281 282echo ======================================== syntax tests ... 283%interpret% -s syntax-tests.scm 284if errorlevel 1 exit /b 1 285 286echo ======================================== syntax tests (compiled) ... 287%compile% syntax-tests.scm 288a.out 289if errorlevel 1 exit /b 1 290 291echo ======================================== syntax tests (v2, compiled) ... 292%compile% syntax-tests-2.scm 293if errorlevel 1 exit /b 1 294a.out 295if errorlevel 1 exit /b 1 296 297echo ======================================== meta-syntax tests ... 298%interpret% -bnq meta-syntax-test.scm -e "(import foo)" -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" -e "(import test-import-syntax-for-syntax)" -e "(assert (equal? '(1) (test)))" -e "(import test-begin-for-syntax)" -e "(assert (equal? '(1) (test)))" 299if errorlevel 1 exit /b 1 300%compile_s% meta-syntax-test.scm -j foo 301if errorlevel 1 exit /b 1 302%compile_s% foo.import.scm 303if errorlevel 1 exit /b 1 304%interpret% -bnq meta-syntax-test.scm -e "(require-library meta-syntax-test)" -e "(import foo)" -e "(assert (equal? '((1)) (bar 1 2)))" -e "(assert (equal? '(list 1 2 3) (listify)))" -e "(import test-import-syntax-for-syntax)" -e "(assert (equal? '(1) (test)))" -e "(import test-begin-for-syntax)" -e "(assert (equal? '(1) (test)))" 305if errorlevel 1 exit /b 1 306 307echo ======================================== reexport tests ... 308%interpret% -bnq reexport-tests.scm 309if errorlevel 1 exit /b 1 310%compile% reexport-tests.scm 311if errorlevel 1 exit /b 1 312a.out 313if errorlevel 1 exit /b 1 314del /f /q reexport-m*.import* 315%compile_s% reexport-m1.scm -J 316if errorlevel 1 exit /b 1 317%compile_s% reexport-m1.import.scm 318if errorlevel 1 exit /b 1 319%interpret% -s reexport-m2.scm 320if errorlevel 1 exit /b 1 321%compile% reexport-m2.scm 322if errorlevel 1 exit /b 1 323a.out 324if errorlevel 1 exit /b 1 325%compile_s% reexport-m3.scm -J 326if errorlevel 1 exit /b 1 327%compile_s% reexport-m4.scm -J 328if errorlevel 1 exit /b 1 329%compile_s% reexport-m5.scm -J 330if errorlevel 1 exit /b 1 331%compile_s% reexport-m6.scm -J 332if errorlevel 1 exit /b 1 333%compile_s% reexport-m7.scm -J 334if errorlevel 1 exit /b 1 335%compile_s% reexport-m8.scm -J 336if errorlevel 1 exit /b 1 337%compile_s% reexport-m9.scm -J 338if errorlevel 1 exit /b 1 339%compile_s% reexport-m10.scm -J 340if errorlevel 1 exit /b 1 341%compile% reexport-tests-2.scm 342if errorlevel 1 exit /b 1 343a.out 344if errorlevel 1 exit /b 1 345 346 347echo ======================================== functor tests ... 348%interpret% -bnq simple-functors-test.scm 349if errorlevel 1 exit /b 1 350%compile% simple-functors-test.scm 351if errorlevel 1 exit /b 1 352a.out 353if errorlevel 1 exit /b 1 354%interpret% -bnq functor-tests.scm 355if errorlevel 1 exit /b 1 356%compile% functor-tests.scm 357if errorlevel 1 exit /b 1 358a.out 359if errorlevel 1 exit /b 1 360%compile% -s square-functor.scm -J 361if errorlevel 1 exit /b 1 362%compile% -s square-functor.import.scm 363if errorlevel 1 exit /b 1 364%interpret% -bnq use-square-functor.scm 365if errorlevel 1 exit /b 1 366%compile% use-square-functor.scm 367if errorlevel 1 exit /b 1 368a.out 369if errorlevel 1 exit /b 1 370%compile% -s use-square-functor.scm -J 371if errorlevel 1 exit /b 1 372%interpret% -nqe "(require-library use-square-functor)" -e "(import sf1)" -e "(import sf2)" 373if errorlevel 1 exit /b 1 374del /f /q sf1.import.* sf2.import.* lst.import.* mod.import.* 375 376echo ======================================== compiler syntax tests ... 377%compile% compiler-syntax-tests.scm 378if errorlevel 1 exit /b 1 379a.out 380if errorlevel 1 exit /b 1 381 382echo ======================================== import tests ... 383%interpret% -bnq import-tests.scm 384if errorlevel 1 exit /b 1 385 386echo ======================================== import library tests ... 387del /f /q ..\foo.import.* foo.import.* 388%compile% import-library-test1.scm -emit-import-library foo 389if errorlevel 1 exit /b 1 390%interpret% -s import-library-test2.scm 391if errorlevel 1 exit /b 1 392%compile_s% foo.import.scm -o foo.import.so 393if errorlevel 1 exit /b 1 394%interpret% -s import-library-test2.scm 395if errorlevel 1 exit /b 1 396%compile% import-library-test2.scm 397if errorlevel 1 exit /b 1 398a.out 399if errorlevel 1 exit /b 1 400del /f /q foo.import.* 401 402echo ======================================== optionals test ... 403%interpret% -s test-optional.scm 404if errorlevel 1 exit /b 1 405%compile% test-optional.scm 406if errorlevel 1 exit /b 1 407a.out 408if errorlevel 1 exit /b 1 409 410echo ======================================== syntax tests (matchable) ... 411%interpret% matchable.scm -s match-test.scm 412if errorlevel 1 exit /b 1 413 414echo ======================================== syntax tests (loopy-loop) ... 415%interpret% -s loopy-test.scm 416if errorlevel 1 exit /b 1 417 418echo ======================================== r4rstest ... 419echo (expect mult-float-print-test to fail) 420%interpret% -e "(set! ##sys#procedure->string (constantly \"#<procedure>\"))" -i -s r4rstest.scm >r4rstest.out 421if errorlevel 1 exit /b 1 422 423type r4rstest.out 424 425echo ======================================== syntax tests (r5rs_pitfalls) ... 426echo (expect two failures) 427%interpret% -i -s r5rs_pitfalls.scm 428if errorlevel 1 exit /b 1 429 430echo "======================================== r7rs tests ..." 431echo (expect two failures) 432%interpret% -i -s r7rs-tests.scm 433if errorlevel 1 exit /b 1 434 435echo ======================================== module tests ... 436%interpret% -include-path %TEST_DIR%/.. -s module-tests.scm 437if errorlevel 1 exit /b 1 438%interpret% -include-path %TEST_DIR%/.. -s module-tests-2.scm 439if errorlevel 1 exit /b 1 440 441echo ======================================== module tests (command line options) ... 442set module="test" 443%compile% test.scm -w -A -j %module% -module %module% 444if errorlevel 1 exit /b 1 445%interpret% -e "(import-syntax %module%)" 446if errorlevel 1 exit /b 1 447del /f /q %module%.import.scm 448 449echo ======================================== module tests (compiled) ... 450%compile% module-tests-compiled.scm 451if errorlevel 1 exit /b 1 452a.out 453if errorlevel 1 exit /b 1 454%compile% module-static-eval-compiled.scm 455if errorlevel 1 exit /b 1 456a.out 457if errorlevel 1 exit /b 1 458%compile% -static module-static-eval-compiled.scm 459if errorlevel 1 exit /b 1 460a.out 461if errorlevel 1 exit /b 1 462 463echo ======================================== module tests (chained) ... 464del /f /q m*.import.* test-chained-modules.so 465%interpret% -bnq test-chained-modules.scm 466if errorlevel 1 exit /b 1 467%compile_s% test-chained-modules.scm -j m3 468if errorlevel 1 exit /b 1 469%compile_s% m3.import.scm 470if errorlevel 1 exit /b 1 471%interpret% -bn test-chained-modules.so 472if errorlevel 1 exit /b 1 473%interpret% -bn test-chained-modules.so -e "(import m3) (s3)" 474if errorlevel 1 exit /b 1 475 476echo ======================================== module tests (ec) ... 477del /f /q ec.so ec.import.* 478%interpret% -bqn ec.scm ec-tests.scm 479if errorlevel 1 exit /b 1 480%compile_s% ec.scm -emit-import-library ec -o ec.so 481if errorlevel 1 exit /b 1 482%compile_s% ec.import.scm -o ec.import.so 483if errorlevel 1 exit /b 1 484%interpret% -bnq ec.so ec-tests.scm 485rem %compile% ec-tests.scm 486rem a.out # takes ages to compile 487 488echo ======================================== module tests (static link) ... 489%compile_r% -static -unit sample-module -J -c sample-module.scm -o sample-module.obj 490if errorlevel 1 exit /b 1 491move sample-module.link %CHICKEN_INSTALL_REPOSITORY% 492move sample-module.import.scm %CHICKEN_INSTALL_REPOSITORY% 493move sample-module.obj %CHICKEN_INSTALL_REPOSITORY% 494%compile_r% -static module-static-link.scm -o a.out 495if errorlevel 1 exit /b 1 496a.out 497if errorlevel 1 exit /b 1 498 499echo ======================================== port tests ... 500%interpret% -s port-tests.scm 501if errorlevel 1 exit /b 1 502 503echo ======================================== read-lines tests ... 504%interpret% -s read-lines-tests.scm 505if errorlevel 1 exit /b 1 506 507echo ======================================== fixnum tests ... 508%compile% fixnum-tests.scm 509if errorlevel 1 exit /b 1 510a.out 511if errorlevel 1 exit /b 1 512%compile% -unsafe fixnum-tests.scm 513if errorlevel 1 exit /b 1 514a.out 515if errorlevel 1 exit /b 1 516 517echo"======================================== random number tests ... 518%interpret% -s random-tests.scm 519if errorlevel 1 exit /b 1 520 521echo ======================================== string-^>number tests ... 522%interpret% -s numbers-string-conversion-tests.scm 523if errorlevel 1 exit /b 1 524%compile% -specialize numbers-string-conversion-tests.scm 525if errorlevel 1 exit /b 1 526a.out 527if errorlevel 1 exit /b 1 528 529echo ======================================== basic numeric ops tests ... 530%interpret% -s numbers-test.scm 531if errorlevel 1 exit /b 1 532%compile% -specialize numbers-test.scm 533if errorlevel 1 exit /b 1 534a.out 535if errorlevel 1 exit /b 1 536 537echo ======================================== Alex Shinns numeric ops tests ... 538%interpret% -s numbers-test-ashinn.scm 539if errorlevel 1 exit /b 1 540%compile% -specialize numbers-test-ashinn.scm 541if errorlevel 1 exit /b 1 542a.out 543if errorlevel 1 exit /b 1 544 545echo ======================================== Gauche numeric ops tests ... 546%interpret% -s numbers-test-gauche.scm 547if errorlevel 1 exit /b 1 548%compile% -specialize numbers-test-gauche.scm 549if errorlevel 1 exit /b 1 550a.out 551if errorlevel 1 exit /b 1 552 553echo ======================================== srfi-4 tests ... 554%interpret% -s srfi-4-tests.scm 555if errorlevel 1 exit /b 1 556 557echo ======================================== condition tests ... 558%interpret% -s condition-tests.scm 559if errorlevel 1 exit /b 1 560 561echo ======================================== data-structures tests ... 562%interpret% -s data-structures-tests.scm 563if errorlevel 1 exit /b 1 564 565echo ======================================== path tests ... 566%interpret% -bnq path-tests.scm 567if errorlevel 1 exit /b 1 568 569echo ======================================== srfi-45 tests ... 570%interpret% -s srfi-45-tests.scm 571if errorlevel 1 exit /b 1 572 573echo ======================================== posix tests ... 574%compile% posix-tests.scm 575if errorlevel 1 exit /b 1 576a.out 577if errorlevel 1 exit /b 1 578 579echo ======================================== file access tests ... 580%interpret% -s file-access-tests.scm / 581if errorlevel 1 exit /b 1 582%interpret% -s file-access-tests.scm \ 583if errorlevel 1 exit /b 1 584 585echo ======================================== find-files tests ... 586%interpret% -bnq test-find-files.scm 587if errorlevel 1 exit /b 1 588 589echo "======================================== record-renaming tests ..." 590%interpret% -bnq record-rename-test.scm 591if errorlevel 1 exit /b 1 592 593echo ======================================== regular expression tests ... 594%interpret% -bnq test-irregex.scm 595if errorlevel 1 exit /b 1 596%interpret% -bnq test-glob.scm 597if errorlevel 1 exit /b 1 598 599echo ======================================== compiler/nursery stress test ... 600for %%s in (100000 120000 200000 250000 300000 350000 400000 450000 500000) do ( 601 echo %%s 602 %CHICKEN% -ignore-repository ..\port.scm -:s%%s -output-file tmp.c -include-path %TEST_DIR%/.. 603 if errorlevel 1 exit /b 1 604) 605 606echo ======================================== heap literal stress test ... 607%compile% heap-literal-stress-test.scm 608if errorlevel 1 exit /b 1 609 610for %%s in (100000 120000 200000 250000 300000 350000 400000 450000 500000) do ( 611 echo %%s 612 a.out -:hi%%s 613 if errorlevel 1 exit /b 1 614) 615 616 617echo ======================================== symbol-GC tests ... 618%compile% symbolgc-tests.scm 619if errorlevel 1 exit /b 1 620a.out 621if errorlevel 1 exit /b 1 622 623echo ======================================== finalizer tests ... 624%interpret% -s test-finalizers.scm 625if errorlevel 1 exit /b 1 626%compile% test-finalizers.scm 627if errorlevel 1 exit /b 1 628a.out 629if errorlevel 1 exit /b 1 630 631echo ======================================== finalizer tests (2) ... 632%compile% finalizer-error-test.scm 633if errorlevel 1 exit /b 1 634a.out -:hg101 635if errorlevel 1 exit /b 1 636%compile% test-finalizers-2.scm 637if errorlevel 1 exit /b 1 638a.out 639if errorlevel 1 exit /b 1 640 641echo ======================================== locative stress test ... 642%compile% locative-stress-test.scm 643if errorlevel 1 exit /b 1 644a.out 645if errorlevel 1 exit /b 1 646 647echo ======================================== syntax-rules stress test ... 648%interpret% -bnq syntax-rule-stress-test.scm 649 650echo "======================================== include test ..." 651mkdir a\b 652echo > a\b\ok.scm 653echo '(include "a/b/ok.scm")' > a\b\include.scm 654%compile% -analyze-only a\b\include.scm 655if errorlevel 1 exit /b 1 656echo '(include "b/ok.scm")' > a\b\include.scm 657%compile% -analyze-only a\b\include.scm -include-path a 658if errorlevel 1 exit /b 1 659echo '(include-relative "ok.scm")' > a\b\include.scm 660%compile% -analyze-only a\b\include.scm 661if errorlevel 1 exit /b 1 662echo '(include-relative "b/ok.scm")' > a\include.scm 663%compile% -analyze-only a\include.scm 664if errorlevel 1 exit /b 1 665echo '(include-relative "b/ok.scm")' > a\b\include.scm 666%compile% -analyze-only a\b\include.scm -include-path a 667if errorlevel 1 exit /b 1 668del /f /s /q a 669 670echo "======================================== executable tests ..." 671%compile% executable-tests.scm 672if errorlevel 1 exit /b 1 673a.out %TEST_DIR%\a.out 674if errorlevel 1 exit /b 1 675 676echo ======================================== embedding (1) ... 677%compile% embedded1.c 678if errorlevel 1 exit /b 1 679a.out 680if errorlevel 1 exit /b 1 681 682echo ======================================== embedding (2) ... 683%compile% -e embedded2.scm 684if errorlevel 1 exit /b 1 685a.out 686if errorlevel 1 exit /b 1 687 688echo ======================================== embedding (3) ... 689%compile% -e embedded3.c embedded4.scm 690if errorlevel 1 exit /b 1 691a.out 692if errorlevel 1 exit /b 1 693 694echo ======================================== linking tests ... 695%compile_r% -unit reverser reverser\tags\1.0\reverser.scm -J -c -o reverser.obj 696%compile_r% -link reverser linking-tests.scm -o a.out 697if errorlevel 1 exit /b 1 698a.out 699if errorlevel 1 exit /b 1 700%compile_r% -link reverser linking-tests.scm -o a.out -static 701if errorlevel 1 exit /b 1 702a.out 703if errorlevel 1 exit /b 1 704move reverser.obj %CHICKEN_INSTALL_REPOSITORY% 705move reverser.import.scm %CHICKEN_INSTALL_REPOSITORY% 706%compile_r% -link reverser linking-tests.scm -o a.out 707if errorlevel 1 exit /b 1 708a.out 709if errorlevel 1 exit /b 1 710%compile_r% -link reverser linking-tests.scm -o a.out -static 711if errorlevel 1 exit /b 1 712a.out 713if errorlevel 1 exit /b 1 714 715echo ======================================== private repository test ... 716del /f /s /q tmp 717mkdir tmp 718%compile% private-repository-test.scm -private-repository -o tmp\xxx 719if errorlevel 1 exit /b 1 720tmp\xxx %CD%\tmp 721set PATH=%CD%\tmp;%PATH% xxx %CD%\tmp 722rem this may crash, if the PATH contains a non-matching libchicken.dll on Windows: 723set PATH=%PATH%;%CD%\tmp xxx %CD%\tmp 724 725echo ======================================== multiple return values tests ... 726%interpret% -s multiple-values.scm 727if errorlevel 1 exit /b 1 728%compile% multiple-values.scm 729if errorlevel 1 exit /b 1 730a.out 731if errorlevel 1 exit /b 1 732 733rem echo ======================================== reinstall tests 734rem currently disabled for windows 735 736echo ======================================== done. All tests passed. 737