Skip to content

Commit 14cd5ac

Browse files
authored
Merge pull request #575 from kraushm/Ruby_2.2.2_NArray
[test] Ruby 2.2.2 NArray test
2 parents dbfa0b6 + 61197fa commit 14cd5ac

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

cscs-checks/mch/check_ruby.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import reframe as rfm
2+
import reframe.utility.sanity as sn
3+
4+
5+
@rfm.simple_test
6+
class RubyNArray(rfm.RunOnlyRegressionTest):
7+
def __init__(self):
8+
super().__init__()
9+
self.descr = ('Check NArray for Ruby version 2.2.2')
10+
self.valid_systems = ['kesch:cn']
11+
self.valid_prog_environs = ['PrgEnv-gnu-nompi']
12+
self.modules = ['ruby/2.2.2-gmvolf-17.02']
13+
self.executable = 'ruby'
14+
self.executable_opts = ['NArray.rb']
15+
self.sanity_patterns = sn.assert_found(r'NArray\.float\(4\):\s*'
16+
r'\[ 1.0, 2.0, 3.0, 4.0 \]',
17+
self.stdout)
18+
self.maintainers = ['MKr']
19+
self.tags = {'production'}

cscs-checks/mch/src/NArray.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env ruby
2+
3+
require "rubygems"
4+
require 'gsl'
5+
6+
g1 = GSL::Vector.alloc(1,2,3,4)
7+
a1 = g1.to_na
8+
9+
p a1

0 commit comments

Comments
 (0)