Skip to content

Commit a5df391

Browse files
committed
try again
1 parent 5505b4e commit a5df391

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ tasks:
66
- func: run tests
77
vars:
88
TEST_NAME: aws_lambda
9-
PYTHON_VERSION: "3.10"
109
tags: [aws_lambda]
1110

1211
# Aws tests

.evergreen/scripts/generate_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ def _create_ocsp_tasks(algo, variant, server_type, base_task_name):
850850

851851
def create_aws_lambda_tasks():
852852
assume_func = FunctionCall(func="assume ec2 role")
853-
vars = dict(TEST_NAME="aws_lambda", PYTHON_VERSION=CPYTHONS[0])
853+
vars = dict(TEST_NAME="aws_lambda")
854854
test_func = FunctionCall(func="run tests", vars=vars)
855855
task_name = "test-aws-lambda-deployed"
856856
tags = ["aws_lambda"]

.evergreen/scripts/run_tests.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ def handle_aws_lambda() -> None:
106106
env["TEST_LAMBDA_DIRECTORY"] = str(target_dir)
107107
env.setdefault("AWS_REGION", "us-east-1")
108108
dirs = ["pymongo", "gridfs", "bson"]
109-
# Store the original .so files.
110-
before_sos = []
109+
# Remove the original .so files.
111110
for dname in dirs:
112-
before_sos.extend(f"{f.parent.name}/{f.name}" for f in (ROOT / dname).glob("*.so"))
111+
so_paths = [f"{f.parent.name}/{f.name}" for f in (ROOT / dname).glob("*.so")]
112+
for so_path in list(so_paths):
113+
Path(so_path).unlink()
113114
# Build the c extensions.
114115
docker = which("docker") or which("podman")
115116
if not docker:
@@ -122,17 +123,11 @@ def handle_aws_lambda() -> None:
122123
target = ROOT / "test/lambda/mongodb" / dname
123124
shutil.rmtree(target, ignore_errors=True)
124125
shutil.copytree(ROOT / dname, target)
125-
print("******", target, os.listdir(target))
126-
# Remove the original so files from the lambda directory.
127-
for so_path in before_sos:
128-
print("removing file", so_path)
129-
(ROOT / "test/lambda/mongodb" / so_path).unlink()
130126
# Remove the new so files from the ROOT directory.
131127
for dname in dirs:
132128
so_paths = [f"{f.parent.name}/{f.name}" for f in (ROOT / dname).glob("*.so")]
133129
for so_path in list(so_paths):
134-
if so_path not in before_sos:
135-
Path(so_path).unlink()
130+
Path(so_path).unlink()
136131

137132
script_name = "run-deployed-lambda-aws-tests.sh"
138133
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/aws_lambda/{script_name}", env=env)

0 commit comments

Comments
 (0)