@@ -682,12 +682,20 @@ int main() {
682
682
device dev = deviceQueue.get_device ();
683
683
const auto &plt = dev.get_platform ();
684
684
} catch (sycl::runtime_error &E) {
685
- const std::string expectedMsg (
686
- " Malformed syntax in SYCL_DEVICE_ALLOWLIST" );
685
+ // Workaround to make CI pass.
686
+ // TODO: after the submission of PR intel/llvm:3826, create PR to
687
+ // intel/llvm-test-suite with removal of 1st parameter of the vector,
688
+ // and transformation of std::vector<std::string> to std::string
689
+ const std::vector<std::string> expectedMsgs{
690
+ " Malformed syntax in SYCL_DEVICE_ALLOWLIST" ,
691
+ " Key DeviceName of SYCL_DEVICE_ALLOWLIST should have value which "
692
+ " starts with {{" };
687
693
const std::string gotMessage (E.what ());
688
- if (gotMessage.find (expectedMsg) != std::string::npos) {
689
- passed = true ;
690
- } else {
694
+ for (const auto &expectedMsg : expectedMsgs) {
695
+ if (gotMessage.find (expectedMsg) != std::string::npos) {
696
+ passed = true ;
697
+ break ;
698
+ }
691
699
passed = false ;
692
700
}
693
701
}
@@ -733,12 +741,20 @@ int main() {
733
741
device dev = deviceQueue.get_device ();
734
742
const auto &plt = dev.get_platform ();
735
743
} catch (sycl::runtime_error &E) {
736
- const std::string expectedMsg (
737
- " Malformed syntax in SYCL_DEVICE_ALLOWLIST" );
744
+ // Workaround to make CI pass.
745
+ // TODO: after the submission of PR intel/llvm:3826, create PR to
746
+ // intel/llvm-test-suite with removal of 1st parameter of the vector,
747
+ // and transformation of std::vector<std::string> to std::string
748
+ const std::vector<std::string> expectedMsgs{
749
+ " Malformed syntax in SYCL_DEVICE_ALLOWLIST" ,
750
+ " Key PlatformName of SYCL_DEVICE_ALLOWLIST should have value "
751
+ " which starts with {{" };
738
752
const std::string gotMessage (E.what ());
739
- if (gotMessage.find (expectedMsg) != std::string::npos) {
740
- passed = true ;
741
- } else {
753
+ for (const auto &expectedMsg : expectedMsgs) {
754
+ if (gotMessage.find (expectedMsg) != std::string::npos) {
755
+ passed = true ;
756
+ break ;
757
+ }
742
758
passed = false ;
743
759
}
744
760
}
@@ -790,12 +806,20 @@ int main() {
790
806
device dev = deviceQueue.get_device ();
791
807
const auto &plt = dev.get_platform ();
792
808
} catch (sycl::runtime_error &E) {
793
- const std::string expectedMsg (
794
- " Malformed syntax in SYCL_DEVICE_ALLOWLIST" );
809
+ // Workaround to make CI pass.
810
+ // TODO: after the submission of PR intel/llvm:3826, create PR to
811
+ // intel/llvm-test-suite with removal of 1st parameter of the vector,
812
+ // and transformation of std::vector<std::string> to std::string
813
+ const std::vector<std::string> expectedMsgs{
814
+ " Malformed syntax in SYCL_DEVICE_ALLOWLIST" ,
815
+ " Key DriverVersion of SYCL_DEVICE_ALLOWLIST should have value "
816
+ " which starts with {{" };
795
817
const std::string gotMessage (E.what ());
796
- if (gotMessage.find (expectedMsg) != std::string::npos) {
797
- passed = true ;
798
- } else {
818
+ for (const auto &expectedMsg : expectedMsgs) {
819
+ if (gotMessage.find (expectedMsg) != std::string::npos) {
820
+ passed = true ;
821
+ break ;
822
+ }
799
823
passed = false ;
800
824
}
801
825
}
@@ -843,12 +867,20 @@ int main() {
843
867
device dev = deviceQueue.get_device ();
844
868
const auto &plt = dev.get_platform ();
845
869
} catch (sycl::runtime_error &E) {
846
- const std::string expectedMsg (
847
- " Malformed syntax in SYCL_DEVICE_ALLOWLIST" );
870
+ // Workaround to make CI pass.
871
+ // TODO: after the submission of PR intel/llvm:3826, create PR to
872
+ // intel/llvm-test-suite with removal of 1st parameter of the vector,
873
+ // and transformation of std::vector<std::string> to std::string
874
+ const std::vector<std::string> expectedMsgs{
875
+ " Malformed syntax in SYCL_DEVICE_ALLOWLIST" ,
876
+ " Key PlatformVersion of SYCL_DEVICE_ALLOWLIST should have value "
877
+ " which starts with {{" };
848
878
const std::string gotMessage (E.what ());
849
- if (gotMessage.find (expectedMsg) != std::string::npos) {
850
- passed = true ;
851
- } else {
879
+ for (const auto &expectedMsg : expectedMsgs) {
880
+ if (gotMessage.find (expectedMsg) != std::string::npos) {
881
+ passed = true ;
882
+ break ;
883
+ }
852
884
passed = false ;
853
885
}
854
886
}
0 commit comments