Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
tests: add test for wallclock module
Browse files Browse the repository at this point in the history
It only test initial packets, but it's better than nothing =)

Signed-off-by: Bruno Dilly <bruno.dilly@intel.com>
  • Loading branch information
bdilly committed Sep 2, 2015
1 parent 50d3c94 commit 549b7d5
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions src/test-fbp/wallclock.fbp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env sol-fbp-runner
# This file is part of the Soletta Project
#
# Copyright (C) 2015 Intel Corporation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MkTime(timestamp/make-time)
Time(timestamp/time)
Delta(timestamp/delta)
Range(int/inrange:range=min:-1|max:1)

Year(wallclock/year:send_initial_packet=true)
Month(wallclock/month:send_initial_packet=true)
Day(wallclock/monthday:send_initial_packet=true)
Hour(wallclock/hour:send_initial_packet=true)
Minute(wallclock/minute:send_initial_packet=true)
Second(wallclock/second:send_initial_packet=true)
NanoSecond(constant/int:value=0)

Year OUT -> YEAR MkTime
Month OUT -> MONTH MkTime
Day OUT -> MONTH_DAY MkTime
Hour OUT -> HOUR MkTime
Minute OUT -> MINUTE MkTime
Second OUT -> SECOND MkTime
NanoSecond OUT -> NANO_SECOND MkTime

Second OUT -> TRIGGER Time
Time OUT -> IN[0] Delta
MkTime OUT -> IN[1] Delta

Delta SECONDS -> IN Range OUT -> RESULT result_wallclock(test/result)

0 comments on commit 549b7d5

Please sign in to comment.