Skip to content

Releases: risinglightdb/sqllogictest-rs

v0.20.2

22 Apr 07:01
ab774f1
Compare
Choose a tag to compare

[0.20.2] - 2024-04-22

  • fix(bin): halt is not handled.

v0.20.1

17 Apr 11:35
ace2231
Compare
Choose a tag to compare

[0.20.1] - 2024-04-17

  • bin: When using -j <jobs> to run tests in parallel, add a random suffix to the temporary databases. This is useful if the test is manually canceled, but you want to rerun it freshly. Note that if the test failed, the database will be dropped. This is existing behavior and unchanged.
  • bin: replace env_logger with tracing-subscriber. You will be able to see the record being executed with RUST_LOG=debug sqllogictest ....
  • runner: fix the behavior of background system commands (end with &). In 0.20.0, it will block until the process exits. Now we return immediately.
    system ok
    sleep 5 &
    

v0.20.0

17 Apr 09:14
38030ac
Compare
Choose a tag to compare

[0.20.0] - 2024-04-08

  • Show stdout, stderr when system command fails.

  • Support matching stdout for system

    system ok
    echo "Hello, world!"
    ----
    Hello, world!
    

    Currently, only exact match is supported. Besides, the output cannot contain more than one blank lines in between. The record ends with two consecutive blank lines.

    Some minor Breaking changes:

    • Add field stdout to parser::Record::System and runner::RecordOutput::System, and mark them as #[non_exhaustive].
    • Change trait method AsyncDB::run_command's return type from std::process::ExitStatus to std::process::Output.

v0.19.1

04 Jan 04:54
58673cb
Compare
Choose a tag to compare

[0.19.1] - 2024-01-04

  • parser: include now returns error if no file is matched.

v0.19.0

14 Nov 03:39
0919ca0
Compare
Choose a tag to compare

[0.19.0] - 2023-11-11

  • parser: refactor expect field in sqllogictest parser to make it easier to work with.

v0.18.0

09 Nov 07:15
7ee44cd
Compare
Choose a tag to compare

[0.18.0] - 2023-11-08

  • Support matching multiline error message under ---- for both statement error and query error.

    query error
    SELECT 1/0;
    ----
    db error: ERROR: Failed to execute query
    
    Caused by these errors:
      1: Failed to evaluate expression: 1/0
      2: Division by zero
    

    The output error message must be the exact match of the expected one to pass the test, except for the leading and trailing whitespaces. Users may use --override to let the runner update the test files with the actual output.

    Empty lines are allowed in the expected error message. As a result, the message must end with two consecutive empty lines.

    Breaking changes in the parser:

    • Add new variants to ParseErrorKind. Mark it as #[non_exhaustive].
    • Change the type of expected_error from Regex to ExpectedError, which is either a inline Regex or multiline String.

v0.17.2

01 Nov 15:10
cf02605
Compare
Choose a tag to compare

[0.17.2] - 2023-11-01

  • fix(runner): fix parallel testing db name duplication. Now we use full file path instead of filename as the temporary db name in run_parallel_async.

v0.17.1

20 Sep 14:00
17d18b8
Compare
Choose a tag to compare

[0.17.1] - 2023-09-20

  • bin: support envvars SLT_HOST/PORT/DB/USER/PASSWORD

v0.17.0

19 Sep 12:17
263aa0c
Compare
Choose a tag to compare

[0.17.0] - 2023-09-19

  • Support environment variables substituion for SQL and system commands.
    For compatibility, this feature is by default disabled, and can be enabled by adding control substitution on to the test file.

    control substitution on
    
    query TTTT
    SELECT
        '$foo'                -- short
      , '${foo}'              -- long
      , '${bar:default}'      -- default value
      , '${bar:$foo-default}' -- recursive default value
    FROM baz;
    ----
    ...
    

    Besides, there's a special variable $__TEST_DIR__ which is the path to a temporary directory specific to the current test case.
    This can be helpful if you need to manipulate some external resources during the test.

    control substitution on
    
    statement ok
    COPY (SELECT * FROM foo) TO '$__TEST_DIR__/foo.txt';
    
    system ok
    echo "foo" > "$__TEST_DIR__/foo.txt"
    

    Changes:

    • (parser) Breaking change: Add Control::Substitution. Mark Control as #[non_exhaustive].
    • (runner) Breaking change: Remove enable_testdir. For migration, one should now enable general substitution by the control statement and use a dollar-prefixed $__TEST_DIR__.

v0.16.0

15 Sep 06:16
d554415
Compare
Choose a tag to compare

[0.16.0] - 2023-09-15

  • Support running external system commands with the syntax below. This is useful for manipulating some external resources during the test.

    system ok
    echo "Hello, world!"
    

    The runner will check the exit code of the command, and the output will be ignored. Currently, only ok is supported.

    Changes:

    • (parser) Breaking change: Add Record::System, and corresponding TestErrorKind and RecordOutput. Mark TestErrorKind and RecordOutput as #[non_exhaustive].
    • (runner) Add run_command to AsyncDB trait. The default implementation will run the command with std::process::Command::status. Implementors can override this method to utilize an asynchronous runtime such as tokio.
  • fix(runner): fix database name duplication for parallel tests by using the full path of the test file (instead of the file name) as the database name.