aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/pppoe/pppoe_msg_enum.h
blob: 7ca19189745ab15d645b6eecfb1e53bf00c687cf (plain)
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
/*
 * pppoe_msg_enum.h - vpp engine plug-in message enumeration
 *
 * Copyright (c) 2017 Intel and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef included_pppoe_msg_enum_h
#define included_pppoe_msg_enum_h

#include <vppinfra/byte_order.h>

#define vl_msg_id(n,h) n,
typedef enum
{
#include <pppoe/pppoe_all_api_h.h>
  /* We'll want to know how many messages IDs we need... */
  VL_MSG_FIRST_AVAILABLE,
} vl_msg_id_t;
#undef vl_msg_id

#endif /* included_pppoe_msg_enum_h */
class="p">, cls).tearDownClass() def test_vapi_c(self): """ run C VAPI tests """ var = "TEST_BR" built_root = os.getenv(var, None) self.assertIsNotNone(built_root, "Environment variable `%s' not set" % var) executable = "%s/vapi_test/vapi_c_test" % built_root worker = Worker([executable, "vapi client", self.get_api_segment_prefix()], self.logger) worker.start() timeout = 60 worker.join(timeout) self.logger.info("Worker result is `%s'" % worker.result) error = False if worker.result is None: try: error = True self.logger.error( "Timeout! Worker did not finish in %ss" % timeout) os.killpg(os.getpgid(worker.process.pid), signal.SIGTERM) worker.join() except: self.logger.debug("Couldn't kill worker-spawned process") raise if error: raise Exception( "Timeout! Worker did not finish in %ss" % timeout) self.assert_equal(worker.result, 0, "Binary test return code") def test_vapi_cpp(self): """ run C++ VAPI tests """ var = "TEST_BR" built_root = os.getenv(var, None) self.assertIsNotNone(built_root, "Environment variable `%s' not set" % var) executable = "%s/vapi_test/vapi_cpp_test" % built_root worker = Worker([executable, "vapi client", self.get_api_segment_prefix()], self.logger) worker.start() timeout = 120 worker.join(timeout) self.logger.info("Worker result is `%s'" % worker.result) error = False if worker.result is None: try: error = True self.logger.error( "Timeout! Worker did not finish in %ss" % timeout) os.killpg(os.getpgid(worker.process.pid), signal.SIGTERM) worker.join() except: raise Exception("Couldn't kill worker-spawned process") if error: raise Exception( "Timeout! Worker did not finish in %ss" % timeout) self.assert_equal(worker.result, 0, "Binary test return code") if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)