Revision: 6306
Author: ek.kato
Date: Mon Apr 5 21:29:34 2010
Log: * test/uim-test-utils.scm
- Use uim-test-source-path for LIBUIM_SYSTEM_SCM_FILES and
LIBUIM_SCM_FILES.
* test/run-test.scm
- (uim-test-build-path) : Bug fix when builddir != srcdir..
- (uim-test-source-path) : New.
- (%add-top-path-to-load-path) : Use uim-test-source-path.
- (main) : Ditto.
* test/uim-test-utils-new.scm
- (uim-test-source-path) : New.
- Use uim-test-source-path for LIBUIM_SYSTEM_SCM_FILES and
LIBUIM_SCM_FILES.
http://code.google.com/p/uim/source/detail?r=6306
Modified:
/trunk/test/run-test.scm
/trunk/test/uim-test-utils-new.scm
/trunk/test/uim-test-utils.scm
=======================================
--- /trunk/test/run-test.scm Sun Apr 4 20:35:54 2010
+++ /trunk/test/run-test.scm Mon Apr 5 21:29:34 2010
@@ -36,6 +36,15 @@
(define (uim-test-build-path . components)
(let* ((test-dir (sys-dirname *program-name*))
+ (cur-dir (current-directory))
+ (top-dir (sys-normalize-pathname (build-path cur-dir "..")
+ :absolute #t
+ :expand #t
+ :canonicalize #t)))
+ (apply build-path top-dir components)))
+
+(define (uim-test-source-path . components)
+ (let* ((test-dir (sys-dirname *program-name*))
(top-dir (sys-normalize-pathname (build-path test-dir "..")
:absolute #t
:expand #t
@@ -43,7 +52,7 @@
(apply build-path top-dir components)))
(define-macro (%add-top-path-to-load-path)
- `(add-load-path ,(uim-test-build-path)))
+ `(add-load-path ,(uim-test-source-path)))
(%add-top-path-to-load-path)
(define gaunit-main main)
@@ -53,8 +62,8 @@
(append args
(if (version<? (gauche-version) "0.8.13")
(append
- (sys-glob (uim-test-build-path "test" "test-*.scm"))
- (sys-glob
(uim-test-build-path "test" "*" "test-*.scm")))
- (glob
(uim-test-build-path "test" "**" "test-*.scm"))))
+ (sys-glob (uim-test-source-path "test" "test-*.scm"))
+ (sys-glob
(uim-test-source-path "test" "*" "test-*.scm")))
+ (glob
(uim-test-source-path "test" "**" "test-*.scm"))))
args)))
(gaunit-main args)))
=======================================
--- /trunk/test/uim-test-utils-new.scm Sun Apr 4 20:35:54 2010
+++ /trunk/test/uim-test-utils-new.scm Mon Apr 5 21:29:34 2010
@@ -39,6 +39,7 @@
(select-module test.uim-test-utils-new)
(define uim-test-build-path (with-module user uim-test-build-path))
+(define uim-test-source-path (with-module user uim-test-source-path))
;; Must be #t when LIBUIM_VERBOSE is set to 2. This enables receiving
;; backtrace following an error.
@@ -47,8 +48,8 @@
(if (version<? *gaunit-version* "0.1.6")
(error "GaUnit 0.1.6 is required"))
-(sys-putenv "LIBUIM_SYSTEM_SCM_FILES"
(uim-test-build-path "sigscheme" "lib"))
-(sys-putenv "LIBUIM_SCM_FILES" (uim-test-build-path "scm"))
+(sys-putenv "LIBUIM_SYSTEM_SCM_FILES"
(uim-test-source-path "sigscheme" "lib"))
+(sys-putenv "LIBUIM_SCM_FILES" (uim-test-source-path "scm"))
;; FIXME: '.libs' is hardcoded
(sys-putenv "LIBUIM_PLUGIN_LIB_DIR" (uim-test-build-path "uim" ".libs"))
(sys-putenv "LIBUIM_VERBOSE" "2") ;; must be 1 or 2 (2 enables backtrace)
=======================================
--- /trunk/test/uim-test-utils.scm Sun Apr 4 20:35:54 2010
+++ /trunk/test/uim-test-utils.scm Mon Apr 5 21:29:34 2010
@@ -41,8 +41,8 @@
(if (version<? *gaunit-version* "0.1.6")
(error "GaUnit 0.1.6 is required"))
-(sys-putenv "LIBUIM_SYSTEM_SCM_FILES"
(uim-test-build-path "sigscheme" "lib"))
-(sys-putenv "LIBUIM_SCM_FILES" (uim-test-build-path "scm"))
+(sys-putenv "LIBUIM_SYSTEM_SCM_FILES"
(uim-test-source-path "sigscheme" "lib"))
+(sys-putenv "LIBUIM_SCM_FILES" (uim-test-source-path "scm"))
;; FIXME: '.libs' is hardcoded
(sys-putenv "LIBUIM_PLUGIN_LIB_DIR" (uim-test-build-path "uim" ".libs"))
(sys-putenv "LIBUIM_VERBOSE" "2") ;; must be 1 or 2 (2 enables backtrace)
--
To unsubscribe, reply using "remove me" as the subject.