Skip to content

Commit 59377d6

Browse files
committed
WIP helper-rust
1 parent b25e658 commit 59377d6

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎appsec/tests/integration/build.gradle‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,10 @@ def runMainTask = { String phpVersion, String variant ->
400400
systemProperty 'PHP_VERSION', phpVersion
401401
systemProperty 'VARIANT', variant
402402

403+
if (project.hasProperty('overrideHelper')) {
404+
systemProperty 'OVERRIDE_HELPER', project.getProperty('overrideHelper')
405+
}
406+
403407
dependsOn "buildTracer-$phpVersion-$variant"
404408
dependsOn "buildAppsec-$phpVersion-$variant"
405409
}
@@ -435,6 +439,9 @@ testMatrix.each { spec ->
435439
if (project.hasProperty('XDEBUG')) {
436440
it.systemProperty 'XDEBUG', '1'
437441
}
442+
if (project.hasProperty('overrideHelper')) {
443+
systemProperty 'OVERRIDE_HELPER', project.getProperty('overrideHelper')
444+
}
438445

439446
it.systemProperty 'DOCKER_MIRROR', dockerMirror
440447
if (!project.hasProperty("floatingImageTags")) {

‎appsec/tests/integration/src/main/groovy/com/datadog/appsec/php/docker/AppSecContainer.groovy‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,13 @@ class AppSecContainer<SELF extends AppSecContainer<SELF>> extends GenericContain
328328
withFileSystemBind('src/test/resources/gdbinit', '/root/.gdbinit', BindMode.READ_ONLY)
329329
withFileSystemBind('src/test/bin/enable_extensions.sh',
330330
'/usr/local/bin/enable_extensions.sh', BindMode.READ_ONLY)
331+
if (System.getProperty('OVERRIDE_HELPER')) {
332+
def libs = System.getProperty('OVERRIDE_HELPER').split(':')
333+
withFileSystemBind(libs[0],
334+
'/appsec/libddappsec-helper.so', BindMode.READ_ONLY)
335+
withFileSystemBind(libs[1],
336+
'/appsec/libddwaf.so', BindMode.READ_ONLY)
337+
}
331338
addVolumeMount("php-appsec-$phpVersion-$phpVariant", '/appsec')
332339
addVolumeMount("php-tracer-$phpVersion-$phpVariant", '/project/tmp')
333340

0 commit comments

Comments
 (0)