Skip to content

Commit

Permalink
now exporting INTENDED_DBDATA_HARDWARE as ssd
Browse files Browse the repository at this point in the history
  • Loading branch information
wangpatrick57 committed Oct 30, 2024
1 parent f916102 commit 4826c35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/tests_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ jobs:
- name: Run integration tests
# Integration tests do require external systems to be running (most commonly a database instance).
# Unlike end-to-end tests though, they test a specific module in a detailed manner, much like a unit test does.
#
# We set `INTENDED_DBDATA_HARDWARE` so that it's seen when `integtest_pg_conn.py` executes `./tune/env/set_up_env_integtests.sh`.
run: |
. "$HOME/.cargo/env"
export INTENDED_DBDATA_HARDWARE=ssd
./scripts/run_integration_tests.sh
- name: Run end-to-end tests
Expand Down
2 changes: 2 additions & 0 deletions tune/env/integtest_pg_conn.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import subprocess
import unittest
from pathlib import Path
Expand Down Expand Up @@ -33,6 +34,7 @@ class PostgresConnTests(unittest.TestCase):

@staticmethod
def setUpClass() -> None:
# If you're running the test locally, this check makes runs past the first one much faster.
if not get_unittest_workspace_path().exists():
subprocess.run(["./tune/env/set_up_env_integtests.sh"], check=True)

Expand Down
3 changes: 2 additions & 1 deletion tune/env/set_up_env_integtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

set -euxo pipefail

INTENDED_DBDATA_HARDWARE="${1:-hdd}"
# INTENDED_DBDATA_HARDWARE can be set elsewhere (e.g. by tests_ci.yaml) but we use hdd by default.
INTENDED_DBDATA_HARDWARE="${INTENDED_DBDATA_HARDWARE:-hdd}"
BENCHMARK=tpch
SCALE_FACTOR=0.01
export DBGYM_CONFIG_PATH=tune/env/env_integtests_dbgym_config.yaml # Note that this envvar needs to be exported.
Expand Down

0 comments on commit 4826c35

Please sign in to comment.