1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
From: William Desportes <williamdes@wdes.fr>
Date: Tue, 15 Apr 2025 10:15:48 +0200
Subject: Mark some tests as not 32 bit compatible
Origin: vendor
Forwarded: not-needed
---
.../Task/System/Condition/HasFreeSpaceConditionTest.php | 4 ++++
tests/Phing/Test/Task/System/FileSizeTaskTest.php | 2 ++
tests/Phing/Test/Type/Selector/DateSelectorTest.php | 16 ++++++++++++----
tests/Phing/Test/Util/SizeHelperTest.php | 4 ++++
4 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/tests/Phing/Test/Task/System/Condition/HasFreeSpaceConditionTest.php b/tests/Phing/Test/Task/System/Condition/HasFreeSpaceConditionTest.php
index 3156383..fabbc60 100644
--- a/tests/Phing/Test/Task/System/Condition/HasFreeSpaceConditionTest.php
+++ b/tests/Phing/Test/Task/System/Condition/HasFreeSpaceConditionTest.php
@@ -42,6 +42,10 @@ class HasFreeSpaceConditionTest extends BuildFileTest
$this->assertInLogs('HasFreeSpaceConditionTest: Enough space in disk.');
}
+ /**
+ * @group 32bit-incompatible
+ */
+ #[\PHPUnit\Framework\Attributes\Group('32bit-incompatible')]
public function testNotEnoughSpace()
{
$this->executeTarget(__FUNCTION__);
diff --git a/tests/Phing/Test/Task/System/FileSizeTaskTest.php b/tests/Phing/Test/Task/System/FileSizeTaskTest.php
index 4fea702..47ed829 100644
--- a/tests/Phing/Test/Task/System/FileSizeTaskTest.php
+++ b/tests/Phing/Test/Task/System/FileSizeTaskTest.php
@@ -44,6 +44,7 @@ class FileSizeTaskTest extends BuildFileTest
/**
* @dataProvider unitAttributeProvider
+ * @group 32bit-incompatible
*
* @param mixed $dummySize
* @param mixed $filesizeUnit
@@ -52,6 +53,7 @@ class FileSizeTaskTest extends BuildFileTest
* @param mixed $expectedSize
*/
#[\PHPUnit\Framework\Attributes\DataProvider('unitAttributeProvider')]
+ #[\PHPUnit\Framework\Attributes\Group('32bit-incompatible')]
public function testUnitAttribute($dummySize, $filesizeUnit, $logVerbose, $logInfo, $expectedSize): void
{
$this->getProject()->setProperty('dummy.size', $dummySize);
diff --git a/tests/Phing/Test/Type/Selector/DateSelectorTest.php b/tests/Phing/Test/Type/Selector/DateSelectorTest.php
index 5dc6ab2..44d0cd6 100644
--- a/tests/Phing/Test/Type/Selector/DateSelectorTest.php
+++ b/tests/Phing/Test/Type/Selector/DateSelectorTest.php
@@ -306,12 +306,14 @@ class DateSelectorTest extends BuildFileTest
}
}
- /*
+ /**
* Test using millis attribute
*
* when defaults to equal
* granularity defaults to 0
+ * @group 32bit-incompatible
*/
+ #[\PHPUnit\Framework\Attributes\Group('32bit-incompatible')]
public function testMillisWithDefaults(): void
{
$epochSeconds = time();
@@ -330,11 +332,13 @@ class DateSelectorTest extends BuildFileTest
$this->assertFileExists($this->outputDir . basename($nowFile), self::getFileStateMsg('Now', false));
}
- /*
+ /**
* Test using millis attribute with when set to after
*
* granularity defaults to 0
+ * @group 32bit-incompatible
*/
+ #[\PHPUnit\Framework\Attributes\Group('32bit-incompatible')]
public function testMillisWithWhenAfter(): void
{
$epochSeconds = time();
@@ -353,11 +357,13 @@ class DateSelectorTest extends BuildFileTest
$this->assertFileExists($this->outputDir . basename($afterFile), self::getFileStateMsg('After', false));
}
- /*
+ /**
* Test using millis attribute with when set to before
*
* granularity defaults to 0
+ * @group 32bit-incompatible
*/
+ #[\PHPUnit\Framework\Attributes\Group('32bit-incompatible')]
public function testMillisWithWhenBefore(): void
{
$epochSeconds = time();
@@ -376,11 +382,13 @@ class DateSelectorTest extends BuildFileTest
$this->assertFileExists($this->outputDir . basename($beforeFile), self::getFileStateMsg('Before', false));
}
- /*
+ /**
* Test using millis attribute with granularity at 60
*
* when defaults to equal
+ * @group 32bit-incompatible
*/
+ #[\PHPUnit\Framework\Attributes\Group('32bit-incompatible')]
public function testMillisGranularitySixSeconds(): void
{
$epochSeconds = time();
diff --git a/tests/Phing/Test/Util/SizeHelperTest.php b/tests/Phing/Test/Util/SizeHelperTest.php
index f01b758..cee0e72 100644
--- a/tests/Phing/Test/Util/SizeHelperTest.php
+++ b/tests/Phing/Test/Util/SizeHelperTest.php
@@ -31,10 +31,12 @@ class SizeHelperTest extends TestCase
{
/**
* @dataProvider fromHumanToBytesProvider
+ * @group 32bit-incompatible
*
* @param mixed $expectedBytes
*/
#[\PHPUnit\Framework\Attributes\DataProvider('fromHumanToBytesProvider')]
+ #[\PHPUnit\Framework\Attributes\Group('32bit-incompatible')]
public function testFromHumanToBytes(string $humanSize, $expectedBytes): void
{
$bytes = SizeHelper::fromHumanToBytes($humanSize);
@@ -116,8 +118,10 @@ class SizeHelperTest extends TestCase
/**
* @dataProvider fromBytesToProvider
+ * @group 32bit-incompatible
*/
#[\PHPUnit\Framework\Attributes\DataProvider('fromBytesToProvider')]
+ #[\PHPUnit\Framework\Attributes\Group('32bit-incompatible')]
public function testFromBytesTo(int $bytes, string $unit, float $expected): void
{
$converted = SizeHelper::fromBytesTo($bytes, $unit);
|