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

[ROCm/hip-tests commit: f072dfd60b]
This commit is contained in:
Jatin Chaudhary
2022-07-11 10:32:51 +01:00
committed by GitHub
parent 0f60303faa
commit 321702b3f5
12 changed files with 144 additions and 33 deletions
@@ -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);
}