From: Martin Quinson Date: Sat, 6 Feb 2016 01:02:19 +0000 (+0100) Subject: kill that ruby script that nobody will ever use X-Git-Tag: v3_13~965 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c2bebbceae24bb9a74fe034c71862c84a6193e7f?hp=1350b7802163fda0235f43a9f8a79f09b30c0ed2;ds=sidebyside kill that ruby script that nobody will ever use --- diff --git a/examples/msg/chainsend/generate_deployment_file.rb b/examples/msg/chainsend/generate_deployment_file.rb deleted file mode 100755 index e290ae18a0..0000000000 --- a/examples/msg/chainsend/generate_deployment_file.rb +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env ruby - -# Copyright (c) 2012-2014. The SimGrid Team. -# All rights reserved. - -# This program is free software; you can redistribute it and/or modify it -# under the terms of the license (GNU LGPL) which comes with this package. - -require 'rexml/document' - -class HostsExtractor - @@doc = nil - @@hosts = [] - - def initialize(xml) - @@doc = REXML::Document.new(xml) - @@doc.elements.each('platform') do |platform| - extract_hosts(platform) - end - end - - def extract_hosts(doc) - doc.elements.each('AS') do |as| - extract_hosts_from_AS(as) - extract_hosts(as) - end - end - - def extract_hosts_from_AS(doc) - doc.elements.each('host') do |h| - @@hosts << h.attributes['id'] - puts "hosts %s" % h.attributes['id'] - end - - doc.elements.each('cluster') do |c| - prefix = c.attributes['prefix'] - suffix = c.attributes['suffix'] - puts "%s %s %s" % [prefix, c.attributes['radical'], suffix] - expand_radical(c.attributes['radical']).each do |num| - @@hosts << "%s%s%s" % [prefix, num, suffix] - end - end - end - - def hosts - return @@hosts - end - - def expand_radical(radical) - l = [] - puts radical - radical.split(',').each do |range| - range.scan(/^\d+$/) { |x| l << x } - range.scan(/^(\d+)-(\d+)$/) { |x, y| (x..y).each do |i| l << i end } - end - return l - end -end - -class DeploymentGenerator - @@outfile = nil - - def initialize(fname) - @@outfile = File.new(fname, "w") - end - - def write_header - @@outfile.puts "" - @@outfile.puts "" - @@outfile.puts "" - end - - def write_process(name, function, hosts, args) - @@outfile.puts " " % name - hosts.zip(args).each do |h, a| - @@outfile.puts " " % [h, function] - @@outfile.puts " " % [a] - @@outfile.puts " " - end - end - - def write_footer - @@outfile.puts "" - end -end - -xml = File.read(ARGV.shift) -he = HostsExtractor.new(xml) - -raise "Cannot run with less than 2 hosts" unless he.hosts.size > 1 - -output = ARGV.shift -n = ARGV.shift -if n == nil or n.to_i < 2 - n = he.hosts.size - 1 -else - n = n.to_i - 1 -end -puts n - -dg = DeploymentGenerator.new(output) -dg.write_header - -puts he.hosts -broadcaster = he.hosts.shift -peers = he.hosts - -dg.write_process("Broadcaster", "broadcaster", [broadcaster], [n]) -dg.write_process("Peers", "peer", peers[0..n-1], (1..n)) - -dg.write_footer diff --git a/tools/internal/check_dist_archive.exclude b/tools/internal/check_dist_archive.exclude index 8ea449782c..7f4d47446c 100644 --- a/tools/internal/check_dist_archive.exclude +++ b/tools/internal/check_dist_archive.exclude @@ -23,7 +23,6 @@ + contrib/.* + examples/msg/actions/NAS_LU_S_4/.* -+ examples/msg/chainsend/generate_deployment_file\.rb + examples/msg/chord/chord3\.xml + examples/smpi/MM/command_exemple