diff options
| author | Andrea Corallo | 2019-11-19 21:26:45 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:38:07 +0100 |
| commit | 0c60b3bae71a010e6abdcfd4d8d38b92c7874609 (patch) | |
| tree | 714418cf525ceb865a5ffce4809506eaa770e082 /test/src | |
| parent | ab5611c25b92ca06238de3d0ae53226176c2ae0d (diff) | |
| download | emacs-0c60b3bae71a010e6abdcfd4d8d38b92c7874609.tar.gz emacs-0c60b3bae71a010e6abdcfd4d8d38b92c7874609.zip | |
fix comp-tests-bootstrap
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/comp-tests.el | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index b008dbd574e..55570d48a30 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el | |||
| @@ -29,6 +29,9 @@ | |||
| 29 | (require 'cl-lib) | 29 | (require 'cl-lib) |
| 30 | (require 'comp) | 30 | (require 'comp) |
| 31 | 31 | ||
| 32 | ;; (setq comp-debug 1) | ||
| 33 | (setq comp-speed 3) | ||
| 34 | |||
| 32 | (defconst comp-test-directory (file-name-directory (or load-file-name | 35 | (defconst comp-test-directory (file-name-directory (or load-file-name |
| 33 | buffer-file-name))) | 36 | buffer-file-name))) |
| 34 | (defconst comp-test-src | 37 | (defconst comp-test-src |
| @@ -40,25 +43,27 @@ | |||
| 40 | (ert-deftest comp-tests-bootstrap () | 43 | (ert-deftest comp-tests-bootstrap () |
| 41 | "Compile the compiler and load it to compile it-self. | 44 | "Compile the compiler and load it to compile it-self. |
| 42 | Check that the resulting binaries do not differ." | 45 | Check that the resulting binaries do not differ." |
| 43 | (let ((comp-file (concat comp-test-directory | 46 | (let* ((comp-src (concat comp-test-directory |
| 44 | "../../lisp/emacs-lisp/comp.el")) | 47 | "../../lisp/emacs-lisp/comp.el")) |
| 45 | (comp1-file (concat temporary-file-directory | 48 | (comp1-src (concat temporary-file-directory |
| 46 | (make-temp-name "stage1-") | 49 | (make-temp-name "stage1-") |
| 47 | ".el")) | 50 | ".el")) |
| 48 | (comp2-file (concat temporary-file-directory | 51 | (comp2-src (concat temporary-file-directory |
| 49 | (make-temp-name "stage2-") | 52 | (make-temp-name "stage2-") |
| 50 | ".el"))) | 53 | ".el")) |
| 51 | (copy-file comp-file comp1-file) | 54 | (comp1 (concat comp1-src "n")) |
| 52 | (copy-file comp-file comp2-file) | 55 | (comp2 (concat comp2-src "n"))) |
| 53 | (load (concat comp-file "c") nil nil t t) | 56 | (copy-file comp-src comp1-src) |
| 57 | (copy-file comp-src comp2-src) | ||
| 58 | (load (concat comp-src "c") nil nil t t) | ||
| 54 | (should (null (subr-native-elisp-p (symbol-function #'native-compile)))) | 59 | (should (null (subr-native-elisp-p (symbol-function #'native-compile)))) |
| 55 | (message "Compiling stage1...") | 60 | (message "Compiling stage1...") |
| 56 | (load (native-compile comp1-file) nil nil t t) | 61 | (load (native-compile comp1-src) nil nil t t) |
| 57 | (should (subr-native-elisp-p (symbol-function 'native-compile))) | 62 | (should (subr-native-elisp-p (symbol-function 'native-compile))) |
| 58 | (message "Compiling stage2...") | 63 | (message "Compiling stage2...") |
| 59 | (native-compile comp2-file) | 64 | (native-compile comp2-src) |
| 60 | (message "Comparing %s %s" comp1-file comp2-file) | 65 | (message "Comparing %s %s" comp1 comp2) |
| 61 | (should (= (call-process "cmp" nil nil nil comp1-file comp2-file) 0)))) | 66 | (should (= (call-process "cmp" nil nil nil comp1 comp2) 0)))) |
| 62 | 67 | ||
| 63 | (ert-deftest comp-tests-provide () | 68 | (ert-deftest comp-tests-provide () |
| 64 | "Testing top level provide." | 69 | "Testing top level provide." |