Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Proof-of-Concept for #22 (use Firebird embedded for Tests) #23

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

fdcastel
Copy link
Contributor

@fdcastel fdcastel commented May 13, 2023

Initial Proof-of-Concept for #22. Do not merge. For initial review only.

  • Windows only (may be expanded to other O.S. later)
  • Helper scripts in Powershell (may be converted to Python)
  • Uses environment variables to pass parameters to test code (simpler than command line arguments)
  • Adds files for VSCode debug/test explorer support (may be removed)

Use the script Rebuild-Databases to

  • download the latest binaries to a $env:TEMP/firebird-driver-tests folder; and
  • rebuild test databases from ./test/fbtest30-src.fbk backup file.

Use the script Set-TestEnvironment to update .env file used by VSCode to discover and run tests.

@fdcastel
Copy link
Contributor Author

Added @pcisar suggestions from #22.

With one difference: it is still using the databases built from Powershell script (instead of the commited ones).

I believe the best course of action from here would be to incorporate the Rebuild-Databases.ps1 logic into tests Setup (in Python).

There are other databases already being created (e.g. fbevents.fdb) in some test cases. Ideally all of them should be built from a single piece of code.

I'll look into this in the next few days. I believe it will make everything simpler.

@fdcastel
Copy link
Contributor Author

I'll look into this in the next few days. I believe it will make everything simpler.

@pcisar if you have other considerations, please comment.

@fdcastel
Copy link
Contributor Author

fdcastel commented May 14, 2023

@pcisar do you have the script to build fbtest30-src.fbk from scratch?

I tried to reverse engineer it but my tools cannot decode the ARRAY columns.

The idea is to rebuild the databases from SQL instead from gbak / .fbk.

@fdcastel
Copy link
Contributor Author

Offtopic. Sometimes I got these errors

./test_driver.py::TestServerStandard::test_wait Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)
./test_driver.py::TestServerStandard::test_running Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)

./test_driver.py::TestServerServices::test_01_output_by_line Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 2: ordinal not in range(128)
./test_driver.py::TestServerServices::test_02_output_to_eof Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)
./test_driver.py::TestServerServices::test_03_log Failed with Error: 'ascii' codec can't decode byte 0xe3 in position 3280: ordinal not in range(128)

I have no idea where they come from. It seems something related to UTF8 (which uses 128 as special marker)?

@fdcastel
Copy link
Contributor Author

@pcisar Could you help me with this one?

@pcisar do you have the script to build fbtest30-src.fbk from scratch?

I tried to reverse engineer it but my tools cannot decode the ARRAY columns.

The idea is to rebuild the databases from SQL instead from gbak / .fbk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant