CTAP2-test-tool icon indicating copy to clipboard operation
CTAP2-test-tool copied to clipboard

Testing on Windows

Open kaczmarczyck opened this issue 5 years ago • 2 comments

The tool is currently used mainly on Linux and MacOS. We need to run all features on Windows to make sure it works.

kaczmarczyck avatar Oct 19 '20 14:10 kaczmarczyck

Why don't you also run some test on Windows through github workflows? And you can even have a scheduled workflow to make a nightly build on all supported OSes every night.

jmichelp avatar Nov 12 '20 22:11 jmichelp

First finding: Bazel's stamping doesn't work on Windows.

A workaround to disable this feature (you have to manually change your report to contain the commit):

diff --git a/.bazelrc b/.bazelrc
index ef88d3d..fbc86ef 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1 +1 @@
-build --cxxopt='-std=c++17' --stamp --workspace_status_command=tools/workspace_status.bat
+build --cxxopt='-std=c++17' --workspace_status_command=tools/workspace_status.bat
diff --git a/BUILD b/BUILD
index 9256f68..ca7cdad 100644
--- a/BUILD
+++ b/BUILD
@@ -93,7 +93,6 @@ cc_library(
         ":constants",
         ":device_interface",
         ":parameter_check",
-        ":stamp",
         "//third_party/chromium_components_cbor:cbor",
         "@com_github_nlohmann_json//:json",
         "@com_google_absl//absl/time",
@@ -158,11 +157,6 @@ cc_library(
     ],
 )
 
-cc_library(
-    name = "stamp",
-    linkstamp = "src/stamp.cc"
-)
-
 cc_binary(
     name = "fido2_conformance",
     srcs = ["src/fido2_conformance_main.cc"],
diff --git a/src/device_tracker.cc b/src/device_tracker.cc
index 64db645..7c0bd52 100644
--- a/src/device_tracker.cc
+++ b/src/device_tracker.cc
@@ -22,8 +22,6 @@
 #include "src/parameter_check.h"
 #include "third_party/chromium_components_cbor/values.h"
 
-extern const char build_scm_revision[];
-
 namespace fido2_tests {
 namespace {
 constexpr std::string_view kFileType = ".json";
@@ -341,7 +339,7 @@ void DeviceTracker::SaveResultsToFile(std::string_view results_dir) const {
   CHECK(results_file.is_open()) << "Unable to open file: " << results_path;
 
   results_file << std::setw(2)
-               << GenerateResultsJson(build_scm_revision, time_string)
+               << GenerateResultsJson("unknown revision", time_string)
                << std::endl;
 }

kaczmarczyck avatar Nov 25 '21 16:11 kaczmarczyck