mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 04:04:00 +00:00
fuzz: adapt harness for v0.9.0 rebase
v0.9.0 already carries the ifcopenshell::file rename this harness was originally adapted for, but moved Logger into the ifcopenshell namespace too (logger::root() -> ifcopenshell::logger::root()) and never had a BUILD_ONLY_COMMON_SCHEMAS cmake option - schema selection there has always been via the SCHEMA_VERSIONS list. Verified with -fsyntax-only against the system-installed v0.9.0 headers.
This commit is contained in:
@@ -27,7 +27,7 @@ cmake ../cmake \
|
||||
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-sanitize-recover=all -g -O1 -fno-omit-frame-pointer" \
|
||||
-DBUILD_FUZZERS=ON -DMINIMAL_BUILD=ON \
|
||||
-DBUILD_IFCGEOM=OFF -DBUILD_CONVERT=OFF -DWITH_OPENCASCADE=OFF \
|
||||
-DBUILD_ONLY_COMMON_SCHEMAS=ON
|
||||
-DSCHEMA_VERSIONS="2x3;4;4x3_add2"
|
||||
cmake --build . --target ifcparse_fuzzer -- -j$(nproc)
|
||||
```
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ bool is_regular_file(const char* path) {
|
||||
extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) {
|
||||
for (int i = 1; i < *argc; ++i) {
|
||||
if (is_regular_file((*argv)[i])) {
|
||||
logger::root().set_output(&std::cerr, &std::cerr);
|
||||
ifcopenshell::logger::root().set_output(&std::cerr, &std::cerr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user