Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

redid how the python was setup to not rely on the local env of our us… #7394

Open
wants to merge 1 commit into
base: tow/implement-new-cassandra-exception
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions atlasdb-jepsen-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ buildscript {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'docker-compose'

task ensureDateUtilPresent(type: Exec) {
commandLine 'sh', 'scripts/ensure-date-util-present.sh'
task setupPythonDependencies(type: Exec) {
commandLine 'sh', 'scripts/setup_python.sh'
}

//task ensureDateUtilPresent(type: Exec) {
// commandLine 'sh', 'scripts/ensure-date-util-present.sh'
//}

task runUnitTestsForPrintLogsInChronologicalOrderScript(type: Exec) {
dependsOn ensureDateUtilPresent
dependsOn setupPythonDependencies
// dependsOn ensureDateUtilPresent
commandLine 'python', 'scripts/print_logs_in_chronological_order.py', '--tests-only'
}

Expand Down
39 changes: 39 additions & 0 deletions atlasdb-jepsen-tests/scripts/setup_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

#
# (c) Copyright 2024 Palantir Technologies Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

set -x

# Create a virtual environment in the project directory
python3 -m venv .venv

# Activate the virtual environment
source .venv/bin/activate

# Install the required Python packages in the virtual environment
pip install python-dateutil

# Verify installation
if python -c "import dateutil" >/dev/null 2>&1; then
echo "DateUtil is present."
else
echo "DateUtil installation failed."
exit 1
fi

# Deactivate the virtual environment
deactivate