mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
QA target can pass on ARM MacBook
The Conscrypt library does not have a native library suitable for running on the ARM MacBooks. As a result, unit tests that rely on Conscrypt also don't work on this hardware. Fortunately, though, the tests will pass without Conscrypt anyway. As a workaround, we can avoid using Conscrypt only when running the unit test suite on these machines. See also: https://github.com/google/conscrypt/issues/1034 Resolves #13382.
This commit is contained in:
committed by
Nicholas Tinsley
parent
716afc98ac
commit
1d5e108cd4
@@ -29,7 +29,10 @@ import static org.whispersystems.signalservice.testutil.LibSignalLibraryUtil.ass
|
||||
public final class AttachmentCipherTest {
|
||||
|
||||
static {
|
||||
Security.insertProviderAt(Conscrypt.newProvider(), 1);
|
||||
// https://github.com/google/conscrypt/issues/1034
|
||||
if (!System.getProperty("os.arch").equals("aarch64")) {
|
||||
Security.insertProviderAt(Conscrypt.newProvider(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -30,7 +30,10 @@ public class ProfileCipherTest {
|
||||
}
|
||||
|
||||
static {
|
||||
Security.insertProviderAt(Conscrypt.newProvider(), 1);
|
||||
// https://github.com/google/conscrypt/issues/1034
|
||||
if (!System.getProperty("os.arch").equals("aarch64")) {
|
||||
Security.insertProviderAt(Conscrypt.newProvider(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -19,7 +19,10 @@ import java.security.cert.CertificateException;
|
||||
public class SigningCertificateTest extends TestCase {
|
||||
|
||||
static {
|
||||
Security.insertProviderAt(Conscrypt.newProvider(), 1);
|
||||
// https://github.com/google/conscrypt/issues/1034
|
||||
if (!System.getProperty("os.arch").equals("aarch64")) {
|
||||
Security.insertProviderAt(Conscrypt.newProvider(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void testGoodSignature() throws CertificateException, NoSuchAlgorithmException, IOException, KeyStoreException, CertPathValidatorException, SignatureException {
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.whispersystems.signalservice.api.crypto;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.conscrypt.Conscrypt;
|
||||
import org.conscrypt.OpenSSLProvider;
|
||||
import org.signal.libsignal.zkgroup.InvalidInputException;
|
||||
import org.signal.libsignal.zkgroup.profiles.ProfileKey;
|
||||
@@ -12,7 +13,10 @@ import java.util.Arrays;
|
||||
public class UnidentifiedAccessTest extends TestCase {
|
||||
|
||||
static {
|
||||
Security.insertProviderAt(new OpenSSLProvider(), 1);
|
||||
// https://github.com/google/conscrypt/issues/1034
|
||||
if (!System.getProperty("os.arch").equals("aarch64")) {
|
||||
Security.insertProviderAt(new OpenSSLProvider(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
private final byte[] EXPECTED_RESULT = {(byte)0x5a, (byte)0x72, (byte)0x3a, (byte)0xce, (byte)0xe5, (byte)0x2c, (byte)0x5e, (byte)0xa0, (byte)0x2b, (byte)0x92, (byte)0xa3, (byte)0xa3, (byte)0x60, (byte)0xc0, (byte)0x95, (byte)0x95};
|
||||
|
||||
Reference in New Issue
Block a user