------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real time scheduling analysis tool. -- This program provides services to automatically check performances -- of real time architectures. -- -- Copyright (C) 2002-2010, by Frank Singhoff, Alain Plantec, Jerome Legrand -- -- The Cheddar project was started in 2002 by -- the LISyC Team, University of Western Britanny. -- -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- Contact : cheddar@listes.univ-brest.fr -- ------------------------------------------------------------------------------ -- Last update : -- $Rev: 97 $ -- $Date: 2007-07-20 15:17:15 +0200 (Fri, 20 Jul 2007) $ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Ada.IO_Exceptions; use Ada.IO_Exceptions; with GNAT.Current_Exception; use GNAT.Current_Exception; with Text_IO; use Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with unbounded_strings; use unbounded_strings; use unbounded_strings.strings_table_package; use unbounded_strings.unbounded_string_list_package; with unbounded_strings; use unbounded_strings; with Parameters; use Parameters; with Parameters.extended; use Parameters.extended; use Parameters.Framework_Parameters_Table_Package; with Systems; use Systems; with Call_Framework; use Call_Framework; with Call_Framework_Interface; use Call_Framework_Interface; use Call_Framework_Interface.Framework_Response_Package; use Call_Framework_Interface.Framework_Request_Package; with Call_Scheduling_Framework; use Call_Scheduling_Framework; with Multiprocessor_Services; use Multiprocessor_Services; with Multiprocessor_Services_Interface; use Multiprocessor_Services_Interface; use Multiprocessor_Services_Interface.Scheduling_Result_Per_Processor_Package; with GNAT.Command_Line; with GNAT.OS_Lib; use GNAT.OS_Lib; with Version; use Version; with Ada.Exceptions; use Ada.Exceptions; with Time_Unit_Events; use Time_Unit_Events; with architecture_models; use architecture_models; procedure test_xml is Sys, Syso : System; Project_File_List : unbounded_string_list; Project_File_Dir_List : unbounded_string_list; -- Is the command should run in verbose mode ? -- Verbose : Boolean := False; procedure Usage is begin Put_Line ("test_xml is a program which print/parser XML Cheddar files"); New_Line; Put_Line( "Check Cheddar home page for details : http://beru.univ-brest.fr/~singhoff/cheddar " ); New_Line; New_Line; Put_Line ("Usage : test_xml "); Put_Line (" switch can be :"); Put_Line (" -u get this help"); Put_Line (" -v verbose mode "); New_Line; end Usage; begin Copyright ("test_xml"); -- Initialize the Cheddar framework -- Call_Framework.initialize (False); -- Get arguments -- loop case GNAT.Command_Line.Getopt ("u v ") is when ASCII.NUL => exit; when 'v' => Verbose := True; when 'u' => Usage; OS_Exit (0); when others => Usage; OS_Exit (0); end case; end loop; loop declare S : constant String := GNAT.Command_Line.Get_Argument (Do_Expansion => True); begin exit when S'Length = 0; end; end loop; -- Build architecture model -- Put_Line ("Testing architecture test1 ..."); test1_xml (Sys); Put_Line ("Testing architecture test2 ..."); test2_xml (Sys); Write_To_Xml_File (Sys, "test2.xmlv3"); Put_Line ("Testing architecture test3 ..."); test3_xml (Sys); Write_To_Xml_File (Sys, "test3.xmlv3"); Put_Line ("Testing architecture test4 ..."); test4_xml (Sys); Write_To_Xml_File (Sys, "test4.xmlv3"); Put_Line ("Testing architecture test5 ..."); test5_xml (Sys); Write_To_Xml_File (Sys, "test5.xmlv3"); Put_Line ("Testing architecture test6 ..."); test6_xml (Sys); Write_To_Xml_File (Sys, "test6.xmlv3"); Put_Line ("Testing architecture test7 ..."); test7_xml (Sys); Write_To_Xml_File (Sys, "test7.xmlv3"); Put_Line ("Testing architecture test8 ..."); test8_xml (Sys); Write_To_Xml_File (Sys, "test8.xmlv3"); Put_Line ("Testing architecture test9 ..."); test9_xml (Sys); Write_To_Xml_File (Sys, "test9.xmlv3"); Put_Line ("Testing architecture test10 ..."); test10_xml (Sys); Write_To_Xml_File (Sys, "test10.xmlv3"); Put_Line ("Testing architecture test11 ..."); test11_xml (Sys); Write_To_Xml_File (Sys, "test11.xmlv3"); Put_Line ("Testing architecture test12 ..."); test12_xml (Sys); Write_To_Xml_File (Sys, "test12.xmlv3"); Put_Line ("Testing architecture test13 ..."); test13_xml (Sys); Write_To_Xml_File (Sys, "test13.xmlv3"); Put_Line ("Testing architecture test_network_xml ..."); test_network_xml (Sys); Write_To_Xml_File (Sys, "test_network_xml.xmlv3"); Put_Line ("Testing architecture csg ..."); csg_xml (Sys); Write_To_Xml_File (Sys, "csg_smart.xmlv3"); Put_Line ("Testing architecture csp ..."); csg_xml (Sys); Write_To_Xml_File (Sys, "csp_smart.xmlv3"); Put_Line ("Testing architecture offset_test1 ..."); offset_test1 (Syso); Write_To_Xml_File (Syso, "offset_test1.xmlv3"); Put_Line ("Testing architecture offset_test2 ..."); offset_test2 (Syso); Write_To_Xml_File (Syso, "offset_test2.xmlv3"); Put_Line ("Testing architecture offset_test3 ..."); offset_test3 (Syso); Write_To_Xml_File (Syso, "offset_test3.xmlv3"); Put_Line ("Testing large models ..."); task100(Syso); Write_To_Xml_File (Syso, "task100.xmlv3"); task200(Syso); Write_To_Xml_File (Syso, "task200.xmlv3"); exception when others => Put_Line ("Exception name : " & Exception_Name); Put_Line ("Exception message : " & Exception_Message); end test_xml;