Skip to content

Commit

Permalink
Issue #1 WIP - Added W3C SPARQL 1.0 Query bound and expr-builtin test…
Browse files Browse the repository at this point in the history
… cases.
  • Loading branch information
donpellegrino authored and GregHanson committed Nov 4, 2024
1 parent d2ac8f7 commit d323500
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 3 deletions.
7 changes: 5 additions & 2 deletions build-devcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ export CPATH="${CPATH}":"${ONEAPI_ROOT}"/compiler/latest/linux/lib/clang/17/incl
mkdir --parents "${PBS_SCRATCHDIR}"/tmp
export TMPDIR="${PBS_SCRATCHDIR}"/tmp

# For the rustix library use libc. Use clang linking.
export RUSTFLAGS="--cfg=rustix_use_libc -C linker=${CMPLR_ROOT}/linux/bin-llvm/clang"
# For the rustix library use libc. Use the default compiler front-end for linking.
# For https://crates.io/crates/cargo-udeps per
# https://community.intel.com/t5/Intel-oneAPI-Base-Toolkit/Is-it-possible-to-create-a-dynamic-shared-object-DSO-with-no/m-p/1250508
# the following was found to work.
export RUSTFLAGS="--cfg=rustix_use_libc -C linker=${CXX} -C link-arg=-lintlc"

# Build on local device storage for performance. Note that build
# artifacts will not persist between jobs.
Expand Down
41 changes: 41 additions & 0 deletions oxhdt-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,4 +416,45 @@ mod tests {
("boolean-effective-value", dawg_boolean_literal, "query-boolean-literal.rq", "data-1.hdt", "result-boolean-literal.ttl")
}
}

mod bound {
rdf_sparql10_test! {
("bound", dawg_bound_query_001, "bound1.rq", "data.hdt", "bound1-result.ttl")
}
}

mod expr_builtin {
rdf_sparql10_ignore_test! {
// Multiple writing of the same xsd:integer. Our system does strong normalization.
("expr-builtin", dawg_str_1, "q-str-1.rq", "data-builtin-1.hdt", "result-str-1.ttl"),
("expr-builtin", dawg_str_2, "q-str-2.rq", "data-builtin-1.hdt", "result-str-2.ttl"),

// Multiple writing of the same xsd:double. Our system does strong normalization.
("expr-builtin", same_term_simple, "sameTerm.rq", "data-builtin-1.hdt", "result-sameTerm.ttl"),
("expr-builtin", same_term_eq, "sameTerm-eq.rq", "data-builtin-1.hdt", "result-sameTerm-eq.ttl"),
("expr-builtin", same_term_not_eq, "sameTerm-not-eq.rq", "data-builtin-1.hdt", "result-sameTerm-not-eq.ttl")
}

rdf_sparql10_test! {
("expr-builtin", dawg_datatype_1, "q-datatype-1.rq", "data-builtin-1.hdt", "result-datatype-1.ttl"),
("expr-builtin", dawg_datatype_2, "q-datatype-2.rq", "data-builtin-2.hdt", "result-datatype-2.srx"),
("expr-builtin", dawg_datatype_3, "q-datatype-3.rq", "data-builtin-2.hdt", "result-datatype-3.srx"),
("expr-builtin", dawg_isblank_1, "q-blank-1.rq", "data-builtin-1.hdt", "result-blank-1.ttl"),
("expr-builtin", dawg_isiri_1, "q-iri-1.rq", "data-builtin-1.hdt", "result-iri-1.ttl"),
("expr-builtin", dawg_isliteral_1, "q-isliteral-1.rq", "data-builtin-2.hdt", "result-isliteral-1.ttl"),
("expr-builtin", dawg_isuri_1, "q-uri-1.rq", "data-builtin-1.hdt", "result-uri-1.ttl"),
("expr-builtin", dawg_lang_1, "q-lang-1.rq", "data-builtin-2.hdt", "result-lang-1.srx"),
("expr-builtin", dawg_lang_2, "q-lang-2.rq", "data-builtin-2.hdt", "result-lang-2.srx"),
("expr-builtin", dawg_lang_3, "q-lang-3.rq", "data-builtin-2.hdt", "result-lang-3.srx"),
("expr-builtin", dawg_langmatches_1, "q-langMatches-1.rq", "data-langMatches.hdt", "result-langMatches-1.ttl"),
("expr-builtin", dawg_langmatches_2, "q-langMatches-2.rq", "data-langMatches.hdt", "result-langMatches-2.ttl"),
("expr-builtin", dawg_langmatches_3, "q-langMatches-3.rq", "data-langMatches.hdt", "result-langMatches-3.ttl"),
("expr-builtin", dawg_langmatches_4, "q-langMatches-4.rq", "data-langMatches.hdt", "result-langMatches-4.ttl"),
("expr-builtin", dawg_langmatches_basic, "q-langMatches-de-de.rq", "data-langMatches-de.hdt", "result-langMatches-de.ttl"),
("expr-builtin", dawg_str_3, "q-str-3.rq", "data-builtin-1.hdt", "result-str-3.ttl"),
("expr-builtin", dawg_str_4, "q-str-4.rq", "data-builtin-1.hdt", "result-str-4.ttl"),
("expr-builtin", lang_case_insensitive_eq, "lang-case-sensitivity-eq.rq", "lang-case-sensitivity.hdt", "lang-case-insensitive-eq.srx"),
("expr-builtin", lang_case_insensitive_ne, "lang-case-sensitivity-ne.rq", "lang-case-sensitivity.hdt", "lang-case-insensitive-ne.srx")
}
}
}
4 changes: 3 additions & 1 deletion oxhdt-sys/tests/resources/generate-hdt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ function test_ttl_to_hdt() {
# test_ttl_to_hdt "algebra"
# test_ttl_to_hdt "bnode-coreference"
# test_ttl_to_hdt "optional"
test_ttl_to_hdt "boolean-effective-value"
# test_ttl_to_hdt "boolean-effective-value"
# test_ttl_to_hdt "bound"
test_ttl_to_hdt "expr-builtin"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit d323500

Please sign in to comment.