Skip to content
Snippets Groups Projects
  1. Feb 04, 2022
    • Yaroslav Dynnikov's avatar
      fix: mistake in inner tests runner · 1619b412
      Yaroslav Dynnikov authored
      1. Fix PICOLIB_AUTORUN env var naming.
      2. Add an assertion that it works as expected.
      3. Show output if listing tests fails.
      3. Run inner tests with listen port :0 to avoid
         "address already in use" errors.
      Verified
      1619b412
  2. Jan 20, 2022
    • Yaroslav Dynnikov's avatar
      feature: run inner tests with cargo · 404f7851
      Yaroslav Dynnikov authored
      Tarantool specificities make it difficult to set up usual rust tests.
      Picolib is coupled with tarantool symbols and compiled as a dylib, so
      it can't be linked to a stand-alone binary.
      
      This patch introduces another way of testing.
      
      All tests (called inner) are already built into dylib and exposed in
      the tarantool console:
      
      ```
      tarantool> picolib.test
      ---
      - test_version: 'function: 0x41f32400'
        test_traft_storage_RaftEntryRow: 'function: 0x41f32550'
      ...
      ```
      
      The new integration test `inner.rs` iterates over them and runs each
      one in a separate tarantool instance.
      
      See also: commit 6610e5cb
      404f7851
  3. Jan 18, 2022
    • Yaroslav Dynnikov's avatar
      Fix env vars precedence · 74c8a370
      Yaroslav Dynnikov authored
      The clap module we use for parsing command-line arguments allows
      specifying `default_value`. Unfortunately, it makes impossible to tell
      if an argument was actually passed. So it always overrides env var with
      a default value, which is undesirable.
      74c8a370
  4. Dec 13, 2021
  5. Dec 07, 2021
  6. Nov 29, 2021
  7. Nov 23, 2021
    • Yaroslav Dynnikov's avatar
      Parse command line arguments · 49eecfa1
      Yaroslav Dynnikov authored
      The control flow of picodata looks as following:
      
      Picodata binary -> exec tarantool -l picodata -> libpicodata.so -> ...
      
      Since the libpicodata is a shared lib loaded by tarantool, we can't pass
      it arguments as usual. At first, tarantool parses them by itself and
      rejects uknown arguments. Secondly, it spoils argv array.
      
      To overcome these two issues, this patch introduces argparse on behalf
      of the picodata binary, and puts parsed values into the environment
      variables.
      
      P.S. Thihs is how command line args look from within libpicodata:
      
      ```console
      $ tarantool -l picodata /dev/null --opt1 foo --opt2 bar
      Hello from rust lib
      arg[0] tarantool
      arg[1] /dev/null
      arg[2] --opt1
      arg[3] foo
      arg[4] --opt2
      arg[5] bar
      arg[6] --opt2
      arg[7] bar
      ```
      49eecfa1
    • Yaroslav Dynnikov's avatar
      Add picodata entrypoint · 9223e526
      Yaroslav Dynnikov authored
      This patch introduces the new cargo package - picodata.
      
      The package consists of two parts:
      - The `picodata` binary does some env magic and executes
        `tarantool -l picodata`.
      - The `libpicodata` dylib is the starting point for further
        development.
      9223e526
Loading