1
1
mirror of https://github.com/kanaka/mal.git synced 2024-10-26 22:28:26 +03:00
Commit Graph

66 Commits

Author SHA1 Message Date
老刘
b4728f7e5a vbs: fix permission denied issue by Github Action 2024-08-15 09:15:44 -05:00
老刘
4275299b97 vbs: remove debug print 2024-08-15 09:15:44 -05:00
老刘
45dba4cbb5 vbs: append print to check out the cmdline 2024-08-15 09:15:44 -05:00
老刘
4a069f7f77 vbs: get the runtest.py from runtest-no-pty-no-echo branch 2024-08-15 09:15:44 -05:00
老刘
ead9cd6390 vbs: rename cy20lin's runtest.py to runtest_backup.py 2024-08-15 09:15:44 -05:00
老刘
b11c166dd1 vbs: restore runtest.py to updated version 2024-08-15 09:15:44 -05:00
老刘
efc93091ef vbs: remove print & 'bash' + args 2024-08-15 09:15:44 -05:00
老刘
21a5acaed6 vbs: change the repeated form from issue 30 for testing 2024-08-15 09:15:44 -05:00
老刘
43a25ff125 vbs: restore runtest.py to unupdated version 2024-08-15 09:15:44 -05:00
老刘
92777df4aa vbs: replace bash script with batch script 2024-08-15 09:15:44 -05:00
老刘
9c86952178 vbs: cannot call bash from runtest.py, so call cmd & run.cmd 2024-08-15 09:15:44 -05:00
老刘
91fc6770f6 vbs: append bash before args 2024-08-15 09:15:44 -05:00
老刘
a8f009b89b vbs: Merge branch 'master' into cy20lin-fix-windows-runtest 2024-08-15 09:15:44 -05:00
Joel Martin
85ff716e5a runtest.py: decode using latin1. Use regex whitespace match.
Some implementations send non-UTF-8 codes (i.e. es6 when showing
function representations). So use latin1 which is probably closer to
what most things are outputting to the terminal.
2024-08-05 17:02:38 -05:00
Ryan Cook
6896b0ab18 add makefile and dockerfile for mal CI for ruby.2 2021-12-13 18:18:16 -06:00
Ryan Cook
c318f495b9 ruby.2 step 1 2021-12-13 18:18:16 -06:00
Ben Harris
9d7fb0fd8d runtest: Treat test timeouts as fatal
If a test times out, that means it hasn't returned a prompt within
reasonable time.  Continuing to type at it is unlikely to be helpful,
since the lack of a prompt indicates that the subprocess has hung, so
subsequent tests are likely to time out as well.

This is particularly annoying in step 5, where the line that usually
times out, "(def! res2 (sum2 10000 0))" has its output ignored, so a
timeout is treated as success, meaning that runtest proceeds to the next
test, which of course also times out.
2020-06-01 15:08:10 +01:00
Ben Harris
ab7ecbbcad runtest: Strip CR on input
Implementations don't generally deliberately emit CR, so any CR we see
was introduced either by the host language runtime or the OS terminal
driver, neither of which we're trying to test.
2020-05-23 11:51:51 +01:00
Ben Harris
d7f5f54c38 runtest: Don't worry about how implementation echoes input
Some of the complexity of runtest is in the way that it insists on
checking whether the implementation managed to echo its input line
correctly.  This isn't really an important part of the implementation,
though, and when using friendly line-editing libraries the echoing can
often end up containing escape sequences.  Simplify things by just
assuming that anything up to the first newline is our input being echoed
back.

This also means that various pre-processing of input is no longer
required.
2020-05-23 11:51:52 +01:00
Joel Martin
e3615597df Revert accidentally pushed close_fds experiment 2020-02-11 10:04:05 -06:00
Joel Martin
88869410d7 DEBUG re-enable (REMOVE ME). 2020-01-23 10:44:19 -06:00
Joel Martin
77489b5906 DISABLE FDs (REMOVE ME). 2020-01-23 10:12:37 -06:00
Joel Martin
ea125102ec FD debug (REMOVE ME). 2020-01-23 09:56:56 -06:00
Joel Martin
9cc6f8ddb6 runtest.py: close FDS on Popen
Be more consistent about what FDs the executing implementation will
have during execution. This makes it more consistent with behavior of
launching the implementation directly.
2020-01-20 17:19:13 -06:00
Ali Mohammad Pur
9d4138ed1e
issue #491
adds a `--crlf` switch to runtest.py
2020-01-15 19:45:33 +03:30
scott-silver
0821b2d458
Add missing word 2019-07-06 11:45:15 -07:00
Joel Martin
ded1d76bf7
Merge pull request #396 from inkydragon/fix-test-on-windows
run test on cygwin
2019-06-03 11:05:00 -04:00
woclass
c89b2a6f7d run test on cygwin 2019-06-02 22:22:52 +08:00
Joel Martin
108d07a2ab Travis: travis_trigger.sh script. 2019-05-30 22:16:46 -05:00
Nicolas Boulenguez
c2b6285ef6 runtest: fix pre-eval option 2019-05-14 19:01:32 +02:00
Joel Martin
18f0ec2150 Runtest should fail on bad test data. Fix interop tests.
The interop tests weren't updated when regex support was added to
runtest for matching output data. This was causing a bunch of
implementations to silently fail while testing interop. Fix runtest.py
to fail on bad test data and fix 21 implementations with the old style
output matches.
2019-01-28 10:27:41 -06:00
Joel Martin
18616b105e runtest: support carriage returns in tests.
This allows carriage returns to be specified in tests which allows
multiline tests to be written i.e. by using Ctrl-V Enter to put
a literal carriage return (^M) into the test definition. The effect of
this is to send a single string to the REPL that contains newlines
which normally can't be done because readline behavior will split it
into two separate lines.
2018-12-10 12:30:58 -06:00
Joel Martin
f6f5d4f2a3 runtest.py: process output/errors as regex match.
Update output test data to be regex compatible.
2018-11-30 14:57:45 -06:00
Joel Martin
96c09dcd40 runtest.py: more generic prompt matching. 2018-11-28 22:19:54 -06:00
Joel Martin
9a66ffcd2e rust: remove rustyline ANSI CSI codes from output 2018-07-13 17:20:44 -05:00
Joel Martin
e17aef048e Misc fixes and TODO updates.
- Truncate ruby and python stacktraces since they can get very long
  in certain cases causing problems.
- Fix Clojure West example with proper escaping.
2017-09-15 00:00:23 -05:00
Joel Martin
16d5b0c305 runtest: print errors before first prompt.
- Also, remove extraneous ffi module dep in miniMAL.
2017-02-11 12:54:34 -06:00
Joel Martin
0e508fa518 Basic: add read-file. Misc basicpp space savings.
- Add read-file which is similar to read-string but from a file name
  rather than a string. This allows steps 0-2 to load although each
  one eventuall crashes with out of memory after evaluating "123"
  a few times.
- basicpp:
    - Renumber the line numbers so they are ordinally increasing. This
      saves 150 or so bytes because GOTO/GOSUB calls have smaller line
      numbers.
    - Shrink 'IF 123' -> 'IF123' for almost 300 byte savings.[:w
    - Simplify PR_MEMORY_SUMMARY output. Save 75 bytes
- Add missing runtest.py change that allows basic tests to pass.
2016-10-23 22:18:08 -05:00
Joel Martin
a1eb30fcc9 Use more common spelling of deferrable.
Deferable is apprently a less common but correct spelling.
2016-05-10 10:26:39 -05:00
Joel Martin
46e2568944 Makefile/runtest/tests: deferable/optional options
- tests/*: marked with deferable and optional runtest flags. Some
  moving around of tests within different sections to more closely
  align with the guide.
- runtest.py has --deferable/--no-deferable and
  --optional/--no-optional to control whether tests marked as
  deferable and optional are tested.
- Makefile: DEFERABLE and OPTIONAL top level flags to be passed to
  runtest when running tests.
- Also, fix problems in java quoting revealed by step7 test changes.
2016-05-09 21:14:15 -05:00
Dov Murik
0072404965 runtest.py: Repeat failed test cases at the bottom 2015-12-14 22:29:12 -05:00
Joel Martin
f3ea3be300 runtest/travis: make soft mode the default.
Switch runtest.py option to --hard instead of --soft. This changes
tests marked as soft into a hard fail tests.
2015-11-09 21:16:38 -06:00
Joel Martin
595376919b Misc cleanup for midwest.io presentation. 2015-11-07 15:31:25 -06:00
Joel Martin
97e2759994 runtest: split debug/log file. Test stats. 2015-10-30 22:29:18 -05:00
Joel Martin
8d78bc26bf All: fix read/print of \\, and \n 2015-10-30 22:05:49 -05:00
Joel Martin
406761e769 ps: fix self-host and runtest.py parsing issue.
- make sure readline has large enough string for steps2-A
- fix keyword? so that it doesn't leave anything extra on the stack
- fix argparse command line parsing so that that the second '--' on
  the command line is not dropped.
2015-10-12 22:14:45 -05:00
Joel Martin
98af2ae360 runtest.py: add --soft option, refactor test reader.
- also, mark later stepA optional as soft.
2015-10-09 09:31:29 -05:00
Joel Martin
5abaa3dc5e runtest.py: add --log-file option.
For logging the full output from the implementation to a file for
debug purposes.
2015-10-07 11:10:32 -05:00
Joel Martin
d2f0f672f4 runtest.py: allow repeated form in output.
This should fix (or rather, workaround)
https://github.com/kanaka/mal/issues/30 where on OS X the input form
is occasionally echo'd twice for some reason.
2015-03-20 08:40:46 -05:00
Joel Martin
b020aa3e77 runtest: exit when child process exits.
Fixes: https://github.com/kanaka/mal/issues/40

- Simplify exception handling by combining keyboard exception into
  other exception handler. Print out output buffer on all exceptions.
2015-03-19 10:49:36 -05:00