File: spec-ruby

package info (click to toggle)
jruby 9.3.9.0%2Bds-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 80,856 kB
  • sloc: ruby: 517,823; java: 260,094; xml: 31,930; ansic: 5,777; yacc: 4,973; sh: 1,163; makefile: 105; jsp: 48; tcl: 40; exp: 11
file content (50 lines) | stat: -rw-r--r-- 3,692 bytes parent folder | download
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
#!/bin/sh

. "$(dirname $0)/common.sh"

prepare

cd "$AUTOPKGTEST_TMP"

for n in SC_CHILD_MAX SC_TZNAME_MAX SC_SYMLOOP_MAX; do
    echo "fails:Etc.sysconf returns the value of POSIX.1 system configuration variable ${n}" >> spec/tags/ruby/library/etc/sysconf_tags.txt
done

# skip failing tests on specific architectures
if [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" = "armel" ] || \
   [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" = "armhf" ]; then
    sed -i '/it.*do$/a    skip "skip for autopkgtest"' spec/ruby/core/file/lutime_spec.rb
    sed -i '/it.*do$/a    skip "skip for autopkgtest"' spec/ruby/core/file/utime_spec.rb
    sed -i '/it "returns the modification Time of the file" do/a    skip "skip for autopkgtest"' spec/ruby/core/file/mtime_spec.rb
    sed -i '/it "returns the modification Time of the file with microseconds" do/a    skip "skip for autopkgtest"' spec/ruby/core/file/mtime_spec.rb
    sed -i '/it "returns the last access time for the named file with microseconds" do/a    skip "skip for autopkgtest"' spec/ruby/core/file/atime_spec.rb
    sed -i '/it "is able to compare files by different modification times" do$/a    skip "skip for autopkgtest"' spec/ruby/core/file/stat/comparison_spec.rb
    sed -i '/it "accepts a length, and an offset" do$/a    skip "skip for autopkgtest"' spec/ruby/core/io/pread_spec.rb
    sed -i '/it "accepts a length, an offset, and an output buffer" do$/a    skip "skip for autopkgtest"' spec/ruby/core/io/pread_spec.rb
    sed -i '/it "does not advance the file pointer" do$/a    skip "skip for autopkgtest"' spec/ruby/core/io/pread_spec.rb
    sed -i '/it "raises EOFError if end-of-file is reached" do$/a    skip "skip for autopkgtest"' spec/ruby/core/io/pread_spec.rb
    sed -i '/it "returns the number of bytes written" do$/a    skip "skip for autopkgtest"' spec/ruby/core/io/pwrite_spec.rb
    sed -i '/it "accepts a string and an offset"  do$/a    skip "skip for autopkgtest"' spec/ruby/core/io/pwrite_spec.rb
    sed -i '/it "does not advance the pointer in the file" do$/a    skip "skip for autopkgtest"' spec/ruby/core/io/pwrite_spec.rb
elif [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" = "s390x" ]; then
    sed -i '/it.*do$/a    skip "skip for autopkgtest"' spec/ruby/core/array/pack/shared/float.rb
    sed -i '/it.*do$/a    skip "skip for autopkgtest"' spec/ruby/core/file/lutime_spec.rb
    sed -i '/it.*do$/a    skip "skip for autopkgtest"' spec/ruby/core/file/stat/comparison_spec.rb
    sed -i '/it "returns the last access time for the named file with microseconds" do/a    skip "skip for autopkgtest"' spec/ruby/core/file/atime_spec.rb
    sed -i '/it "returns the change time for the named file.*with microseconds\." do/a    skip "skip for autopkgtest"' spec/ruby/core/file/ctime_spec.rb
    sed -i '/it "returns the modification Time of the file with microseconds" do/a    skip "skip for autopkgtest"' spec/ruby/core/file/mtime_spec.rb
    sed -i '/it "may set nanosecond precision" do/a    skip "skip for autopkgtest"' spec/ruby/core/file/utime_spec.rb
    sed -i '/it "decodes NaN" do/a    skip "skip for autopkgtest"' spec/ruby/core/string/unpack/shared/float.rb
fi

# skip failing pack/unpack tests on 32-bit arches (i386, armel and armhf)
# unknown cause, unclear if these failures are expected,
# as upstream does not actually run CI on 32-bit platforms
# see https://github.com/jruby/jruby/issues/7542
if [ $(dpkg-architecture -qDEB_BUILD_ARCH_BITS) -eq 32 ]; then
   sed -i 's/platform_is pointer_size: 32 do/if false/' spec/ruby/core/array/pack/j_spec.rb
   sed -i 's/platform_is pointer_size: 32 do/if false/' spec/ruby/core/string/unpack/j_spec.rb
fi

# run the rspec testsuite
jruby -S rake spec:ruby:fast