mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-15 00:47:34 +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)
|
||||
@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 \
|
||||
echo "[PASS] $${f%.scm}"; \
|
||||
else \
|
||||
|
@ -248,49 +248,49 @@ test-build:
|
|||
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)
|
||||
$(CHIBI) tests/thread-tests.scm
|
||||
$(CHIBI) -xscheme tests/thread-tests.scm
|
||||
|
||||
test-numbers: chibi-scheme$(EXE)
|
||||
$(CHIBI) tests/numeric-tests.scm
|
||||
$(CHIBI) -xscheme tests/numeric-tests.scm
|
||||
|
||||
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)
|
||||
$(CHIBI) tests/hash-tests.scm
|
||||
$(CHIBI) -xscheme tests/hash-tests.scm
|
||||
|
||||
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)
|
||||
$(CHIBI) tests/match-tests.scm
|
||||
$(CHIBI) -xscheme tests/match-tests.scm
|
||||
|
||||
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)
|
||||
$(CHIBI) tests/sort-tests.scm
|
||||
$(CHIBI) -xscheme tests/sort-tests.scm
|
||||
|
||||
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)
|
||||
$(CHIBI) tests/weak-tests.scm
|
||||
$(CHIBI) -xscheme tests/weak-tests.scm
|
||||
|
||||
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)
|
||||
$(CHIBI) tests/process-tests.scm
|
||||
$(CHIBI) -xscheme tests/process-tests.scm
|
||||
|
||||
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)
|
||||
$(CHIBI) tests/lib-tests.scm
|
||||
$(CHIBI) -xscheme tests/lib-tests.scm
|
||||
|
||||
test: chibi-scheme$(EXE)
|
||||
$(CHIBI) tests/r5rs-tests.scm
|
||||
$(CHIBI) -xscheme tests/r5rs-tests.scm
|
||||
|
||||
install: all
|
||||
$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;;; The Computer Language Benchmarks Game
|
||||
;;; http://shootout.alioth.debian.org/
|
||||
|
||||
(import (srfi 9))
|
||||
(import (scheme) (srfi 9))
|
||||
|
||||
(define-record-type node
|
||||
(make-node value left right)
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
;;; based on Racket version by Matthew Flatt
|
||||
|
||||
(import (srfi 18)
|
||||
(import (scheme)
|
||||
(srfi 18)
|
||||
(chibi match))
|
||||
|
||||
(define (print . args)
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
;;; based on Racket version by Matthew Flatt
|
||||
|
||||
(import (srfi 69)
|
||||
(import (scheme)
|
||||
(srfi 69)
|
||||
(srfi 95)
|
||||
(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.
|
||||
(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 }
|
||||
|
||||
test:V:
|
||||
./$O.out tests/r5rs-tests.scm
|
||||
./$O.out -xscheme tests/r5rs-tests.scm
|
||||
|
||||
test-threads:
|
||||
./$O.out tests/thread-tests.scm
|
||||
./$O.out -xscheme tests/thread-tests.scm
|
||||
|
||||
test-numbers:
|
||||
./$O.out tests/numeric-tests.scm
|
||||
./$O.out -xscheme tests/numeric-tests.scm
|
||||
|
||||
test-flonums:
|
||||
./$O.out tests/flonum-tests.scm
|
||||
./$O.out -xscheme tests/flonum-tests.scm
|
||||
|
||||
test-hash:
|
||||
./$O.out tests/hash-tests.scm
|
||||
./$O.out -xscheme tests/hash-tests.scm
|
||||
|
||||
test-match:
|
||||
./$O.out tests/match-tests.scm
|
||||
./$O.out -xscheme tests/match-tests.scm
|
||||
|
||||
test-loop:
|
||||
./$O.out tests/loop-tests.scm
|
||||
./$O.out -xscheme tests/loop-tests.scm
|
||||
|
||||
test-sort:
|
||||
./$O.out tests/sort-tests.scm
|
||||
./$O.out -xscheme tests/sort-tests.scm
|
||||
|
||||
test-records:
|
||||
./$O.out tests/record-tests.scm
|
||||
./$O.out -xscheme tests/record-tests.scm
|
||||
|
||||
test-weak:
|
||||
./$O.out tests/weak-tests.scm
|
||||
./$O.out -xscheme tests/weak-tests.scm
|
||||
|
||||
test-unicode:
|
||||
./$O.out tests/unicode-tests.scm
|
||||
./$O.out -xscheme tests/unicode-tests.scm
|
||||
|
||||
test-libs:
|
||||
./$O.out tests/lib-tests.scm
|
||||
./$O.out -xscheme tests/lib-tests.scm
|
||||
|
||||
sexp.c:N: gc.c opt/bignum.c
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
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 \
|
||||
&& diff -q ${f%.scm}.err ${f%.scm}.err-res; then
|
||||
echo "[PASS] ${f%.scm}"
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#! /usr/bin/env chibi-scheme
|
||||
|
||||
(import
|
||||
(srfi 1) (chibi modules) (chibi ast) (chibi io) (chibi match) (chibi time)
|
||||
(chibi filesystem) (chibi scribble) (chibi highlight) (chibi type-inference))
|
||||
(scheme) (srfi 1) (chibi modules) (chibi ast) (chibi io) (chibi match)
|
||||
(chibi time) (chibi filesystem) (chibi scribble) (chibi highlight)
|
||||
(chibi type-inference))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
@ -208,7 +209,7 @@
|
|||
|
||||
(define (expand-example x env)
|
||||
(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
|
||||
,(expand-codeblock `(,(car x) language: scheme ,@(cdr x)) env)
|
||||
(code
|
||||
|
@ -222,7 +223,7 @@
|
|||
|
||||
(define (expand-example-import x env)
|
||||
(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)
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
;; several of the core modules provide C interfaces directly without
|
||||
;; using the stubber.
|
||||
|
||||
(import (scheme))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; globals
|
||||
|
||||
|
@ -1342,7 +1344,7 @@
|
|||
(define (generate file)
|
||||
(display "/* automatically generated by chibi genstubs */\n")
|
||||
(c-system-include "chibi/eval.h")
|
||||
(load file)
|
||||
(load file (current-environment))
|
||||
(write-init))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#! /usr/bin/env chibi-scheme
|
||||
|
||||
(import (chibi filesystem)
|
||||
(import (scheme)
|
||||
(chibi filesystem)
|
||||
(chibi pathname)
|
||||
(only (meta) find-module))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue