EXSWCPHIPT-125 - Add tests for hipGetDeviceCount and restructure some SpawnProc tests (#2765)

[ROCm/hip-tests commit: f072dfd60b]
此提交包含在:
Jatin Chaudhary
2022-07-11 10:32:51 +01:00
提交者 GitHub
父節點 0f60303faa
當前提交 321702b3f5
共有 12 個檔案被更改,包括 144 行新增 和 33 行删除
+2 -16
查看文件
@@ -1,5 +1,5 @@
/*
Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -23,20 +23,6 @@ THE SOFTWARE.
#include <hip_test_common.hh>
#include <hip_test_process.hh>
__global__ void test_kernel() {
printf("%08d\n", 42);
printf("%08i\n", -42);
printf("%08u\n", 42);
printf("%08g\n", 123.456);
printf("%0+8d\n", 42);
printf("%+d\n", -42);
printf("%+08d\n", 42);
printf("%-8s\n", "xyzzy");
printf("% i\n", -42);
printf("%-16.8d\n", 42);
printf("%16.8d\n", 42);
}
TEST_CASE("Unit_printf_flags") {
std::string reference(R"here(00000042
-0000042
@@ -51,7 +37,7 @@ xyzzy
00000042
)here");
hip::SpawnProc proc("printfExe/printfFlags", true);
hip::SpawnProc proc("printfFlags", true);
REQUIRE(proc.run() == 0);
REQUIRE(proc.getOutput() == reference);
}