[libcxx-commits] [libcxx] 8835921 - [libc++][chrono] TZDB CI fixes.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 7 11:31:58 PDT 2023


Author: Mark de Wever
Date: 2023-09-07T20:31:18+02:00
New Revision: 88359213ee499ed2cc02c4bf0dba7b5e9af37ff6

URL: https://github.com/llvm/llvm-project/commit/88359213ee499ed2cc02c4bf0dba7b5e9af37ff6
DIFF: https://github.com/llvm/llvm-project/commit/88359213ee499ed2cc02c4bf0dba7b5e9af37ff6.diff

LOG: [libc++][chrono] TZDB CI fixes.

Fixes a conflict with adding the no experimental module build.

Disables some tests that need further investigation, this should fix the
CI runners.

These issues were reported on Discord and in D154282.

Added: 
    

Modified: 
    libcxx/modules/std/chrono.inc
    libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb.pass.cpp
    libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb_list.pass.cpp
    libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/front.pass.cpp
    libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/iterators.pass.cpp
    libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/reload_tzdb.pass.cpp
    libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/remote_version.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/modules/std/chrono.inc b/libcxx/modules/std/chrono.inc
index 7cb5b4ac708fd09..65dc973936c47f1 100644
--- a/libcxx/modules/std/chrono.inc
+++ b/libcxx/modules/std/chrono.inc
@@ -193,6 +193,7 @@ export namespace std {
 #if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) &&                              \
     !defined(_LIBCPP_HAS_NO_LOCALIZATION)
 
+#  ifdef _LIBCPP_ENABLE_EXPERIMENTAL
     // [time.zone.db], time zone database
     using std::chrono::tzdb;
     using std::chrono::tzdb_list;
@@ -207,10 +208,10 @@ export namespace std {
     using std::chrono::reload_tzdb;
     using std::chrono::remote_version;
 
-#endif //  !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) &&
-       //    !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#  endif //  !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) &&
+         //    !defined(_LIBCPP_HAS_NO_LOCALIZATION)
 
-#if 0
+#  if 0
     // [time.zone.exception], exception classes
     using std::chrono::ambiguous_local_time;
     using std::chrono::nonexistent_local_time;
@@ -238,8 +239,9 @@ export namespace std {
 
     // [time.format], formatting
     using std::chrono::local_time_format;
-#endif
-  } // namespace chrono
+#  endif
+#endif // _LIBCPP_ENABLE_EXPERIMENTAL
+  }    // namespace chrono
 
 #ifndef _LIBCPP_HAS_NO_LOCALIZATION
   using std::formatter;

diff  --git a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb.pass.cpp
index 08e78963042e5bf..4fec102b66aa25e 100644
--- a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb.pass.cpp
@@ -12,6 +12,9 @@
 // XFAIL: libcpp-has-no-incomplete-tzdb
 // XFAIL: availability-tzdb-missing
 
+// TODO TZDB Enable tests
+// UNSUPPORTED: c++20, c++23, c++26
+
 // <chrono>
 
 // const tzdb& get_tzdb();

diff  --git a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb_list.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb_list.pass.cpp
index a5579a3820b6ac4..4d7647145ee0893 100644
--- a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb_list.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/get_tzdb_list.pass.cpp
@@ -12,6 +12,9 @@
 // XFAIL: libcpp-has-no-incomplete-tzdb
 // XFAIL: availability-tzdb-missing
 
+// TODO TZDB Enable tests
+// UNSUPPORTED: c++20, c++23, c++26
+
 // <chrono>
 
 // const tzdb& get_tzdb_list();

diff  --git a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/front.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/front.pass.cpp
index 12c5310772f6a9c..485cf9766962a70 100644
--- a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/front.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/front.pass.cpp
@@ -12,6 +12,9 @@
 // XFAIL: libcpp-has-no-incomplete-tzdb
 // XFAIL: availability-tzdb-missing
 
+// TODO TZDB Enable tests
+// UNSUPPORTED: c++20, c++23, c++26
+
 // <chrono>
 //
 // class tzdb_list;

diff  --git a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/iterators.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/iterators.pass.cpp
index b00b8b44188d0bb..7fec4cf8556b54a 100644
--- a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/iterators.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/iterators.pass.cpp
@@ -12,6 +12,9 @@
 // XFAIL: libcpp-has-no-incomplete-tzdb
 // XFAIL: availability-tzdb-missing
 
+// TODO TZDB Enable tests
+// UNSUPPORTED: c++20, c++23, c++26
+
 // <chrono>
 //
 // class tzdb_list;

diff  --git a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/reload_tzdb.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/reload_tzdb.pass.cpp
index af38772ee3cb286..35d40b32d485fe8 100644
--- a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/reload_tzdb.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/reload_tzdb.pass.cpp
@@ -12,6 +12,9 @@
 // XFAIL: libcpp-has-no-incomplete-tzdb
 // XFAIL: availability-tzdb-missing
 
+// TODO TZDB Enable tests
+// UNSUPPORTED: c++20, c++23, c++26
+
 // <chrono>
 
 // Note there is no Standard way to change the remote database used.

diff  --git a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/remote_version.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/remote_version.pass.cpp
index 36b68cefc8d31a6..f749adc3a63c63b 100644
--- a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/remote_version.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/remote_version.pass.cpp
@@ -12,6 +12,9 @@
 // XFAIL: libcpp-has-no-incomplete-tzdb
 // XFAIL: availability-tzdb-missing
 
+// TODO TZDB Enable tests
+// UNSUPPORTED: c++20, c++23, c++26
+
 // <chrono>
 
 // const string remote_version();


        


More information about the libcxx-commits mailing list