AK: Add initial support for AK testsuite on Windows
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

We now explicitly enabling support for the minimum libraries needed
to build and run the AK testsuite. 81/82 tests are running and
passing. The exception is LexicalPath, as some path behaviour on
Windows is different than Unix, so the current tests will have lots of
platform specific failures. The implementer of LexicalPathWindows
recommended windows-specific tests here, so I will do that in a
follow up.
This commit is contained in:
ayeteadoe 2025-05-19 16:16:18 -07:00 committed by Andrew Kaster
commit 8cf01a25c2
Notes: github-actions[bot] 2025-05-20 16:59:46 +00:00
8 changed files with 53 additions and 15 deletions

View file

@ -9,8 +9,10 @@
#include <AK/ByteString.h>
#include <AK/StringBuilder.h>
#include <AK/Vector.h>
#include <math.h>
#include <unistd.h>
#ifdef AK_OS_WINDOWS
# include <stdio.h>
#endif
TEST_CASE(is_integral_works_properly)
{
@ -232,8 +234,12 @@ TEST_CASE(file_descriptor)
{
char filename[] = "/tmp/test-file-descriptor-XXXXXX";
#ifdef AK_OS_WINDOWS
FILE* file = tmpfile();
#else
int fd = mkstemp(filename);
FILE* file = fdopen(fd, "w+");
#endif
outln(file, "{}", "Hello, World!");
out(file, "foo");