mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-15 08:57:33 +02:00
Followup to previous patch - updating scripts to import (scheme), and tests to run with -xscheme.
This commit is contained in:
parent
64fdfc1c8c
commit
47ad791d5d
10 changed files with 45 additions and 39 deletions
32
Makefile
32
Makefile
|
@ -233,7 +233,7 @@ checkdefs:
|
||||||
|
|
||||||
test-basic: chibi-scheme$(EXE)
|
test-basic: chibi-scheme$(EXE)
|
||||||
@for f in tests/basic/*.scm; do \
|
@for f in tests/basic/*.scm; do \
|
||||||
$(CHIBI) $$f >$${f%.scm}.out 2>$${f%.scm}.err; \
|
$(CHIBI) -xscheme $$f >$${f%.scm}.out 2>$${f%.scm}.err; \
|
||||||
if $(DIFF) -q $(DIFFOPTS) $${f%.scm}.out $${f%.scm}.res; then \
|
if $(DIFF) -q $(DIFFOPTS) $${f%.scm}.out $${f%.scm}.res; then \
|
||||||
echo "[PASS] $${f%.scm}"; \
|
echo "[PASS] $${f%.scm}"; \
|
||||||
else \
|
else \
|
||||||
|
@ -248,49 +248,49 @@ test-build:
|
||||||
MAKE=$(MAKE) ./tests/build/build-tests.sh
|
MAKE=$(MAKE) ./tests/build/build-tests.sh
|
||||||
|
|
||||||
test-threads: chibi-scheme$(EXE) lib/srfi/18/threads$(SO) lib/srfi/39/param$(SO) lib/srfi/98/env$(SO) lib/chibi/ast$(SO) lib/chibi/time$(SO)
|
test-threads: chibi-scheme$(EXE) lib/srfi/18/threads$(SO) lib/srfi/39/param$(SO) lib/srfi/98/env$(SO) lib/chibi/ast$(SO) lib/chibi/time$(SO)
|
||||||
$(CHIBI) tests/thread-tests.scm
|
$(CHIBI) -xscheme tests/thread-tests.scm
|
||||||
|
|
||||||
test-numbers: chibi-scheme$(EXE)
|
test-numbers: chibi-scheme$(EXE)
|
||||||
$(CHIBI) tests/numeric-tests.scm
|
$(CHIBI) -xscheme tests/numeric-tests.scm
|
||||||
|
|
||||||
test-flonums: chibi-scheme$(EXE)
|
test-flonums: chibi-scheme$(EXE)
|
||||||
$(CHIBI) tests/flonum-tests.scm
|
$(CHIBI) -xscheme tests/flonum-tests.scm
|
||||||
|
|
||||||
test-hash: chibi-scheme$(EXE) lib/srfi/69/hash$(SO)
|
test-hash: chibi-scheme$(EXE) lib/srfi/69/hash$(SO)
|
||||||
$(CHIBI) tests/hash-tests.scm
|
$(CHIBI) -xscheme tests/hash-tests.scm
|
||||||
|
|
||||||
test-io: chibi-scheme$(EXE) lib/chibi/io/io$(SO)
|
test-io: chibi-scheme$(EXE) lib/chibi/io/io$(SO)
|
||||||
$(CHIBI) tests/io-tests.scm
|
$(CHIBI) -xscheme tests/io-tests.scm
|
||||||
|
|
||||||
test-match: chibi-scheme$(EXE)
|
test-match: chibi-scheme$(EXE)
|
||||||
$(CHIBI) tests/match-tests.scm
|
$(CHIBI) -xscheme tests/match-tests.scm
|
||||||
|
|
||||||
test-loop: chibi-scheme$(EXE)
|
test-loop: chibi-scheme$(EXE)
|
||||||
$(CHIBI) tests/loop-tests.scm
|
$(CHIBI) -xscheme tests/loop-tests.scm
|
||||||
|
|
||||||
test-sort: chibi-scheme$(EXE) lib/srfi/33/bit$(SO)
|
test-sort: chibi-scheme$(EXE) lib/srfi/33/bit$(SO)
|
||||||
$(CHIBI) tests/sort-tests.scm
|
$(CHIBI) -xscheme tests/sort-tests.scm
|
||||||
|
|
||||||
test-records: chibi-scheme$(EXE)
|
test-records: chibi-scheme$(EXE)
|
||||||
$(CHIBI) tests/record-tests.scm
|
$(CHIBI) -xscheme tests/record-tests.scm
|
||||||
|
|
||||||
test-weak: chibi-scheme$(EXE) lib/chibi/weak$(SO)
|
test-weak: chibi-scheme$(EXE) lib/chibi/weak$(SO)
|
||||||
$(CHIBI) tests/weak-tests.scm
|
$(CHIBI) -xscheme tests/weak-tests.scm
|
||||||
|
|
||||||
test-unicode: chibi-scheme$(EXE)
|
test-unicode: chibi-scheme$(EXE)
|
||||||
$(CHIBI) tests/unicode-tests.scm
|
$(CHIBI) -xscheme tests/unicode-tests.scm
|
||||||
|
|
||||||
test-process: chibi-scheme$(EXE) lib/chibi/process$(SO)
|
test-process: chibi-scheme$(EXE) lib/chibi/process$(SO)
|
||||||
$(CHIBI) tests/process-tests.scm
|
$(CHIBI) -xscheme tests/process-tests.scm
|
||||||
|
|
||||||
test-system: chibi-scheme$(EXE) lib/chibi/system$(SO)
|
test-system: chibi-scheme$(EXE) lib/chibi/system$(SO)
|
||||||
$(CHIBI) tests/system-tests.scm
|
$(CHIBI) -xscheme tests/system-tests.scm
|
||||||
|
|
||||||
test-libs: chibi-scheme$(EXE)
|
test-libs: chibi-scheme$(EXE)
|
||||||
$(CHIBI) tests/lib-tests.scm
|
$(CHIBI) -xscheme tests/lib-tests.scm
|
||||||
|
|
||||||
test: chibi-scheme$(EXE)
|
test: chibi-scheme$(EXE)
|
||||||
$(CHIBI) tests/r5rs-tests.scm
|
$(CHIBI) -xscheme tests/r5rs-tests.scm
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(MKDIR) $(DESTDIR)$(BINDIR)
|
$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
;;; The Computer Language Benchmarks Game
|
;;; The Computer Language Benchmarks Game
|
||||||
;;; http://shootout.alioth.debian.org/
|
;;; http://shootout.alioth.debian.org/
|
||||||
|
|
||||||
(import (srfi 9))
|
(import (scheme) (srfi 9))
|
||||||
|
|
||||||
(define-record-type node
|
(define-record-type node
|
||||||
(make-node value left right)
|
(make-node value left right)
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
;;; based on Racket version by Matthew Flatt
|
;;; based on Racket version by Matthew Flatt
|
||||||
|
|
||||||
(import (srfi 18)
|
(import (scheme)
|
||||||
|
(srfi 18)
|
||||||
(chibi match))
|
(chibi match))
|
||||||
|
|
||||||
(define (print . args)
|
(define (print . args)
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
;;; based on Racket version by Matthew Flatt
|
;;; based on Racket version by Matthew Flatt
|
||||||
|
|
||||||
(import (srfi 69)
|
(import (scheme)
|
||||||
|
(srfi 69)
|
||||||
(srfi 95)
|
(srfi 95)
|
||||||
(chibi io))
|
(chibi io))
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
(import (srfi 18) (chibi net) (chibi io) (chibi filesystem))
|
(import (scheme) (srfi 18) (chibi net) (chibi io) (chibi filesystem))
|
||||||
|
|
||||||
;; Copy each input line to output.
|
;; Copy each input line to output.
|
||||||
(define (echo-handler in out)
|
(define (echo-handler in out)
|
||||||
|
|
24
mkfile
24
mkfile
|
@ -24,39 +24,39 @@ install:V: $BIN/$TARG
|
||||||
{cd lib; tar c .} | {cd $MODDIR ; tar x }
|
{cd lib; tar c .} | {cd $MODDIR ; tar x }
|
||||||
|
|
||||||
test:V:
|
test:V:
|
||||||
./$O.out tests/r5rs-tests.scm
|
./$O.out -xscheme tests/r5rs-tests.scm
|
||||||
|
|
||||||
test-threads:
|
test-threads:
|
||||||
./$O.out tests/thread-tests.scm
|
./$O.out -xscheme tests/thread-tests.scm
|
||||||
|
|
||||||
test-numbers:
|
test-numbers:
|
||||||
./$O.out tests/numeric-tests.scm
|
./$O.out -xscheme tests/numeric-tests.scm
|
||||||
|
|
||||||
test-flonums:
|
test-flonums:
|
||||||
./$O.out tests/flonum-tests.scm
|
./$O.out -xscheme tests/flonum-tests.scm
|
||||||
|
|
||||||
test-hash:
|
test-hash:
|
||||||
./$O.out tests/hash-tests.scm
|
./$O.out -xscheme tests/hash-tests.scm
|
||||||
|
|
||||||
test-match:
|
test-match:
|
||||||
./$O.out tests/match-tests.scm
|
./$O.out -xscheme tests/match-tests.scm
|
||||||
|
|
||||||
test-loop:
|
test-loop:
|
||||||
./$O.out tests/loop-tests.scm
|
./$O.out -xscheme tests/loop-tests.scm
|
||||||
|
|
||||||
test-sort:
|
test-sort:
|
||||||
./$O.out tests/sort-tests.scm
|
./$O.out -xscheme tests/sort-tests.scm
|
||||||
|
|
||||||
test-records:
|
test-records:
|
||||||
./$O.out tests/record-tests.scm
|
./$O.out -xscheme tests/record-tests.scm
|
||||||
|
|
||||||
test-weak:
|
test-weak:
|
||||||
./$O.out tests/weak-tests.scm
|
./$O.out -xscheme tests/weak-tests.scm
|
||||||
|
|
||||||
test-unicode:
|
test-unicode:
|
||||||
./$O.out tests/unicode-tests.scm
|
./$O.out -xscheme tests/unicode-tests.scm
|
||||||
|
|
||||||
test-libs:
|
test-libs:
|
||||||
./$O.out tests/lib-tests.scm
|
./$O.out -xscheme tests/lib-tests.scm
|
||||||
|
|
||||||
sexp.c:N: gc.c opt/bignum.c
|
sexp.c:N: gc.c opt/bignum.c
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
for f in tests/memory/*.scm; do
|
for f in tests/memory/*.scm; do
|
||||||
./chibi-scheme-ulimit $f >${f%.scm}.out 2>${f%.scm}.err
|
./chibi-scheme-ulimit -xscheme $f >${f%.scm}.out 2>${f%.scm}.err
|
||||||
if diff -q ${f%.scm}.out ${f%.scm}.res \
|
if diff -q ${f%.scm}.out ${f%.scm}.res \
|
||||||
&& diff -q ${f%.scm}.err ${f%.scm}.err-res; then
|
&& diff -q ${f%.scm}.err ${f%.scm}.err-res; then
|
||||||
echo "[PASS] ${f%.scm}"
|
echo "[PASS] ${f%.scm}"
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#! /usr/bin/env chibi-scheme
|
#! /usr/bin/env chibi-scheme
|
||||||
|
|
||||||
(import
|
(import
|
||||||
(srfi 1) (chibi modules) (chibi ast) (chibi io) (chibi match) (chibi time)
|
(scheme) (srfi 1) (chibi modules) (chibi ast) (chibi io) (chibi match)
|
||||||
(chibi filesystem) (chibi scribble) (chibi highlight) (chibi type-inference))
|
(chibi time) (chibi filesystem) (chibi scribble) (chibi highlight)
|
||||||
|
(chibi type-inference))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
@ -208,7 +209,7 @@
|
||||||
|
|
||||||
(define (expand-example x env)
|
(define (expand-example x env)
|
||||||
(let ((expr `(begin ,@(sxml->sexp-list x)))
|
(let ((expr `(begin ,@(sxml->sexp-list x)))
|
||||||
(example-env (or (env-ref env 'example-env) (interaction-environment))))
|
(example-env (or (env-ref env 'example-env) (current-environment))))
|
||||||
`(div
|
`(div
|
||||||
,(expand-codeblock `(,(car x) language: scheme ,@(cdr x)) env)
|
,(expand-codeblock `(,(car x) language: scheme ,@(cdr x)) env)
|
||||||
(code
|
(code
|
||||||
|
@ -222,7 +223,7 @@
|
||||||
|
|
||||||
(define (expand-example-import x env)
|
(define (expand-example-import x env)
|
||||||
(eval `(import ,@(cdr x))
|
(eval `(import ,@(cdr x))
|
||||||
(or (env-ref env 'example-env) (interaction-environment)))
|
(or (env-ref env 'example-env) (current-environment)))
|
||||||
"")
|
"")
|
||||||
|
|
||||||
(define (expand-command sxml env)
|
(define (expand-command sxml env)
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
;; several of the core modules provide C interfaces directly without
|
;; several of the core modules provide C interfaces directly without
|
||||||
;; using the stubber.
|
;; using the stubber.
|
||||||
|
|
||||||
|
(import (scheme))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; globals
|
;; globals
|
||||||
|
|
||||||
|
@ -1342,7 +1344,7 @@
|
||||||
(define (generate file)
|
(define (generate file)
|
||||||
(display "/* automatically generated by chibi genstubs */\n")
|
(display "/* automatically generated by chibi genstubs */\n")
|
||||||
(c-system-include "chibi/eval.h")
|
(c-system-include "chibi/eval.h")
|
||||||
(load file)
|
(load file (current-environment))
|
||||||
(write-init))
|
(write-init))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#! /usr/bin/env chibi-scheme
|
#! /usr/bin/env chibi-scheme
|
||||||
|
|
||||||
(import (chibi filesystem)
|
(import (scheme)
|
||||||
|
(chibi filesystem)
|
||||||
(chibi pathname)
|
(chibi pathname)
|
||||||
(only (meta) find-module))
|
(only (meta) find-module))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue