openssl/test/recipes/79-test_http.t
Matt Caswell 53d0d01fd4 Avoid some MinGW test failures
There were 4 classes of failure:

- line ending problems;
- unicode problems;
- file path munging problems; and
- a "hang" in test_cmp_http.

The unicode problems appear to be somewhere between wine or msys - they
don't actually appear to be a problem with the built binaries. We just skip
those tests for now.

Fixes #13558

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15939)
2021-07-02 17:44:02 +01:00

29 lines
951 B
Raku

#! /usr/bin/env perl
# Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use OpenSSL::Test qw/:DEFAULT srctop_file/;
use OpenSSL::Test::Utils;
setup("test_http");
plan tests => 2;
SKIP: {
skip "sockets disabled", 1 if disabled("sock");
skip "OCSP disabled", 1 if disabled("ocsp");
my $cmd = [qw{openssl ocsp -index any -port 0}];
my @output = run(app($cmd), capture => 1);
$output[0] =~ s/\r\n/\n/g;
ok($output[0] =~ /^ACCEPT (0.0.0.0|\[::\]):(\d+?) PID=(\d+)$/
&& $2 >= 1024 && $3 > 0,
"HTTP server auto-selects and reports local port >= 1024 and pid > 0");
}
ok(run(test(["http_test", srctop_file("test", "certs", "ca-cert.pem")])));