Skip to content

Commit

Permalink
apacheGH-43175: [C++] Skip not Emscripten ready tests in CSV tests (a…
Browse files Browse the repository at this point in the history
…pache#43724)

### Rationale for this change

We can't use thread nor `%z` on Emacripten. Some CSV tests use them.

### What changes are included in this PR?

Skip CSV tests that use thread or `%z`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#43175

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored Aug 17, 2024
1 parent 8836535 commit 49be60f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ci/scripts/cpp_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ case "$(uname)" in
;;
esac

if [ "${ARROW_EMSCRIPTEN:-OFF}" = "ON" ]; then
if [ "${ARROW_EMSCRIPTEN:-OFF}" = "ON" ]; then
n_jobs=1 # avoid spurious fails on emscripten due to loading too many big executables
fi

Expand Down
11 changes: 11 additions & 0 deletions cpp/src/arrow/csv/column_decoder_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ class NullColumnDecoderTest : public ColumnDecoderTest {
}

void TestThreaded() {
#ifndef ARROW_ENABLE_THREADING
GTEST_SKIP() << "Test requires threading support";
#endif
constexpr int NITERS = 10;
auto type = int32();
MakeDecoder(type);
Expand Down Expand Up @@ -257,6 +260,10 @@ class TypedColumnDecoderTest : public ColumnDecoderTest {
}

void TestThreaded() {
#ifndef ARROW_ENABLE_THREADING
GTEST_SKIP() << "Test requires threading support";
#endif

constexpr int NITERS = 10;
auto type = uint32();
MakeDecoder(type, default_options);
Expand Down Expand Up @@ -305,6 +312,10 @@ class InferringColumnDecoderTest : public ColumnDecoderTest {
}

void TestThreaded() {
#ifndef ARROW_ENABLE_THREADING
GTEST_SKIP() << "Test requires threading support";
#endif

constexpr int NITERS = 10;
auto type = float64();
MakeDecoder(default_options);
Expand Down
5 changes: 5 additions & 0 deletions cpp/src/arrow/csv/converter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,11 @@ TEST(TimestampConversion, UserDefinedParsers) {
}

TEST(TimestampConversion, UserDefinedParsersWithZone) {
#ifdef __EMSCRIPTEN__
GTEST_SKIP() << "Test temporarily disabled due to emscripten bug "
"https://github.com/emscripten-core/emscripten/issues/20467";
#endif

auto options = ConvertOptions::Defaults();
auto type = timestamp(TimeUnit::SECOND, "America/Phoenix");

Expand Down

0 comments on commit 49be60f

Please sign in to comment.