diff options
Diffstat (limited to 'vo/votest/tests/samp.tests')
-rw-r--r-- | vo/votest/tests/samp.tests/req_2.0.cl | 21 | ||||
-rw-r--r-- | vo/votest/tests/samp.tests/req_2.0.out | 8 | ||||
-rw-r--r-- | vo/votest/tests/samp.tests/req_2.1.cl | 69 | ||||
-rw-r--r-- | vo/votest/tests/samp.tests/req_2.1.out | 17 | ||||
-rw-r--r-- | vo/votest/tests/samp.tests/req_2.2.cl | 61 |
5 files changed, 176 insertions, 0 deletions
diff --git a/vo/votest/tests/samp.tests/req_2.0.cl b/vo/votest/tests/samp.tests/req_2.0.cl new file mode 100644 index 00000000..a9c382ff --- /dev/null +++ b/vo/votest/tests/samp.tests/req_2.0.cl @@ -0,0 +1,21 @@ +# +# Demonstrate general use of SAMP interoperability. + +# Set the test description string. +votest.descr = "Demonstrate general use of SAMP interoperability" + + +print ("------------------------------------------------------------------") +print ("Req 2: Users shall be able to interoperate with other SAMP") +print (" (or WebSAMP) enabled applications.") +print ("------------------------------------------------------------------") + + +fcache init + +#-------------------------------------------------------------------------- + +print ("Demonstration of the general use of SAMP is accomplished via the") +print ("specific SAMP test scripts.") +print ("") +print ("") diff --git a/vo/votest/tests/samp.tests/req_2.0.out b/vo/votest/tests/samp.tests/req_2.0.out new file mode 100644 index 00000000..669d36f7 --- /dev/null +++ b/vo/votest/tests/samp.tests/req_2.0.out @@ -0,0 +1,8 @@ +------------------------------------------------------------------ +Req 2: Users shall be able to interoperate with other SAMP + (or WebSAMP) enabled applications. +------------------------------------------------------------------ +Demonstration of the general use of SAMP is accomplished via the +specific SAMP test scripts. + + diff --git a/vo/votest/tests/samp.tests/req_2.1.cl b/vo/votest/tests/samp.tests/req_2.1.cl new file mode 100644 index 00000000..4fc85352 --- /dev/null +++ b/vo/votest/tests/samp.tests/req_2.1.cl @@ -0,0 +1,69 @@ +# +# Demonstrate ability to send targeted or broadcast SAMP messages. + +# Set the test description string. +votest.descr = "Demonstrate ability to send targeted or broadcast messages" + +print ("------------------------------------------------------------------") +print ("Req 2.1: Users shall be able to send messages to specific") +print (" clients or broadcast to all available clients.") +print ("------------------------------------------------------------------") + + +fcache init + +string res + +# Execute the test commands. +print ("") +print ("") +print ("") + + +# Convert the data$logical to a local path. +s1 = data_url // "/usno-b.xml" +s2 = "file://" // data_path // "/usno-b.xml" +s3 = "file:///localhost" // data_path // "/usno-b.xml" + + +# Startup topcat as a recipient application. +if (sampAccess ("topcat") == yes) { + + ########################################### + # Broadcast to all clients. + ########################################### + + # Command mode + samp ("loadVOTable", "data$usno-b.xml") + samp ("loadVOTable", s1) + samp ("loadVOTable", s2) + samp ("loadVOTable", s3) + + # Program mode + res = sampLoadVOTable ("data$usno-b.xml") + res = sampLoadVOTable (s1) + res = sampLoadVOTable (s2) + res = sampLoadVOTable (s3) + + + ########################################### + # Targeted message to specific client. + ########################################### + + # Command mode + samp ("loadVOTable", "data$usno-b.xml", to="topcat") + samp ("loadVOTable", s1, to="topcat") + samp ("loadVOTable", s2, to="topcat") + samp ("loadVOTable", s3, to="topcat") + + # Program mode + res = sampLoadVOTable ("data$usno-b.xml", "topcat") + res = sampLoadVOTable (s1, "topcat") + res = sampLoadVOTable (s2, "topcat") + res = sampLoadVOTable (s3, "topcat") + +} else { + print ("Topcat is not running... skipping this test.") + return +} + diff --git a/vo/votest/tests/samp.tests/req_2.1.out b/vo/votest/tests/samp.tests/req_2.1.out new file mode 100644 index 00000000..265a16e6 --- /dev/null +++ b/vo/votest/tests/samp.tests/req_2.1.out @@ -0,0 +1,17 @@ +------------------------------------------------------------------ +Req 2.1: Users shall be able to send messages to specific + clients or broadcast to all available clients. +------------------------------------------------------------------ + + + +ok +ok +ok +ok +ok +ok +ok +ok +Stopping Topcat ... +off diff --git a/vo/votest/tests/samp.tests/req_2.2.cl b/vo/votest/tests/samp.tests/req_2.2.cl new file mode 100644 index 00000000..e42fa0aa --- /dev/null +++ b/vo/votest/tests/samp.tests/req_2.2.cl @@ -0,0 +1,61 @@ +# +# Demonstrate ability to execute remote IRAF cmds via SAMP + +# Set the test description string. +votest.descr = "Demonstrate ability to execute remote IRAF cmds via SAMP" + +print ("------------------------------------------------------------------") +print ("Req 2.2: Users shall be able to execute IRAF tasks and set or") +print (" retrieve information in/from the IRAF environment via") +print (" SAMP messaging from clients that implement the required") +print (" message types.") +print ("------------------------------------------------------------------") + + +string res + +# Execute the test commands. +print ("") +print ("") +print ("") + + +########################################### +# Broadcast to all clients. +########################################### + +# Remote command execution +res = sampCmdExec ("imstat dev$pix") + +# Environment Set/Get +res = sampEnvSet ("foo", "bar") +res = sampEnvGet ("foo") +print ("Result = " // res) + +# Task Parameter Set/Get +res = sampParamSet ("imstat.images", "dev$pix") +res = sampParamGet ("imstat.images") +print ("Parameter = " // res) + + + +########################################### +# Targeted message to specific client. +########################################### + + +# Remote command execution +res = sampCmdExec ("imstat dev$pix", "iraf2") + +# Environment Set/Get +res = sampEnvSet ("foo", "bar", "iraf2") +res = sampEnvGet ("foo", "iraf2") +print ("Result = " // res) + +# Task Parameter Set/Get +res = sampParamSet ("imstat.images", "dev$pix", "iraf2") +res = sampParamGet ("imstat.images", "iraf2") +print ("Parameter = " // res) + + + |